/* Vila Sabor — HUD v4 ("jogo casual vibrante"), ART-DIRECTION.md §5.
 *
 * Grammar shared by every piece:
 *   thick warm-dark outline (--vs-ink) · gradient fill (--c-hi → --c → --c-lo) · glossy top highlight (::before)
 *   · chunky extruded drop (0 4px 0 ink) + soft shadow · rounded heavy type (Fredoka 600–700) with an ink text stroke.
 *
 * Colour is applied with one modifier class that sets --c / --c-hi / --c-lo:
 *   .c-tomato .c-sun .c-orange .c-teal .c-blue .c-leaf .c-guava .c-grape .c-cream .c-wood .c-sky
 *
 * Building blocks:  .vs-glossy (any gradient piece) · .vs-press (hover lift / press sink) · .vs-stroke (outlined text)
 *                   .vs-ico (icon box from icons-v4.js, sized by --s) · .vs-btn · .vs-round · .vs-badge · .vs-chip
 * HUD regions:      .vs-hud > .vs-tl (coins, chips, quests) · .vs-level · .vs-tr (plaque) · .vs-visit · .vs-cam
 *                   · .vs-nbar · .vs-dock · .vs-toasts ; panels: .vs-scrim + .vs-panel (cards .vs-card)
 * States:           .vs-hud.is-visiting (own-only [data-scope="own"] hidden, [data-scope="visit"] shown),
 *                   aria-pressed / .is-active, [disabled], .is-locked, .is-weekly, .is-done, .is-bump, .is-pop, .is-gaining
 *
 * Fonts: the page loads Google Fonts "Fredoka" (500;600;700). Everything degrades to Baloo 2 / system rounded fonts.
 */

:root {
  --vs-ink: #3A2418;
  --vs-ink-2: #5B3A26;
  --vs-tomato: #E8453C;
  --vs-sun: #FFC531;
  --vs-orange: #FF8A2A;
  --vs-teal: #19B3B1;
  --vs-blue: #2F6BD8;
  --vs-leaf: #52B848;
  --vs-guava: #F2577C;
  --vs-grape: #8E5BD6;
  --vs-cream: #FFF1D6;
  --vs-paper: #FFF7E8;
  --vs-honey: #E09A4F;
  --vs-wood: #9A5A2C;
  --vs-wood-dk: #6E3B1C;
  --vs-sky: #8FD3FF;
  --vs-gold-text: #FFE27A;

  --vs-font: "Fredoka", "Baloo 2", "Nunito", ui-rounded, "Segoe UI Rounded", system-ui, sans-serif;
  --vs-bw: 3px;
  --vs-lift: 4px;
  --vs-drop: 0 var(--vs-lift) 0 var(--vs-ink);
  --vs-soft: 0 10px 18px -6px rgba(40, 16, 4, .5);
  --vs-inner: inset 0 2px 0 rgba(255, 255, 255, .55), inset 0 -4px 0 rgba(0, 0, 0, .16);
  --vs-ease: cubic-bezier(.2, .8, .3, 1);
  --vs-ease-pop: cubic-bezier(.34, 1.56, .64, 1);

  /* 8-direction ink outline + a little extrusion: readable on any 3D backdrop */
  --vs-ts: 0 2px 0 #3A2418, 2px 0 0 #3A2418, 0 -2px 0 #3A2418, -2px 0 0 #3A2418,
    1.5px 1.5px 0 #3A2418, -1.5px 1.5px 0 #3A2418, 1.5px -1.5px 0 #3A2418, -1.5px -1.5px 0 #3A2418, 0 3.5px 0 #3A2418;
  --vs-ts-sm: 0 1.5px 0 #3A2418, 1.5px 0 0 #3A2418, 0 -1.5px 0 #3A2418, -1.5px 0 0 #3A2418,
    1px 1px 0 #3A2418, -1px 1px 0 #3A2418, 1px -1px 0 #3A2418, -1px -1px 0 #3A2418, 0 2.5px 0 #3A2418;

  --vs-gutter: 14px;
  --vs-top: calc(12px + env(safe-area-inset-top, 0px));
  --vs-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  --vs-disc: 62px;
  --vs-cam: 50px;
  /* outer height of the bottom-right dock: the zoom rail stands this far (+ a gap) above the screen bottom */
  --vs-dock-h: 114px;
}

/* ---- colour modifiers ------------------------------------------------------------------------------------------ */

.c-tomato { --c: #E8453C; --c-hi: #FF8371; --c-lo: #B8261F; }
.c-sun    { --c: #FFC531; --c-hi: #FFE88A; --c-lo: #E58E0E; }
.c-orange { --c: #FF8A2A; --c-hi: #FFBA6B; --c-lo: #D5600F; }
.c-teal   { --c: #19B3B1; --c-hi: #6BE6DC; --c-lo: #0B8784; }
.c-blue   { --c: #2F6BD8; --c-hi: #74A7FF; --c-lo: #1C47A6; }
.c-leaf   { --c: #52B848; --c-hi: #96E668; --c-lo: #2E8A2B; }
.c-guava  { --c: #F2577C; --c-hi: #FF97AE; --c-lo: #C7345B; }
.c-grape  { --c: #8E5BD6; --c-hi: #BE97FF; --c-lo: #6338AE; }
.c-cream  { --c: #FFF1D6; --c-hi: #FFFFFF; --c-lo: #F0CC92; }
.c-wood   { --c: #B86E35; --c-hi: #E09A4F; --c-lo: #7E431B; }
.c-sky    { --c: #5CB8F5; --c-hi: #A8DEFF; --c-lo: #2F86D0; }

/* ---- primitives ------------------------------------------------------------------------------------------------ */

.vs-hud, .vs-panel, .vs-toasts {
  font-family: var(--vs-font);
  color: var(--vs-ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
.vs-hud [hidden], .vs-panel[hidden], .vs-panel [hidden], .vs-scrim[hidden] { display: none !important; }
:where(.vs-hud, .vs-panel, .vs-toasts, .vs-float), :where(.vs-hud, .vs-panel, .vs-toasts, .vs-float) *,
:where(.vs-hud, .vs-panel, .vs-toasts) *::before, :where(.vs-hud, .vs-panel, .vs-toasts) *::after { box-sizing: border-box; }
/* zero specificity so component classes (.vs-btn, .vs-weekly…) keep their own colour and size */
:where(.vs-hud, .vs-panel) :where(button) { font: inherit; color: inherit; }

.vs-ico {
  --s: 1.5em;
  display: inline-block;
  flex: none;
  width: var(--s);
  height: var(--s);
  line-height: 0;
  vertical-align: middle;
}
.vs-ico > svg { display: block; width: 100%; height: 100%; overflow: visible; }

.vs-stroke { color: #fff; text-shadow: var(--vs-ts); letter-spacing: .01em; }
.vs-stroke-sm { color: #fff; text-shadow: var(--vs-ts-sm); letter-spacing: .01em; }

.vs-glossy {
  position: relative;
  isolation: isolate;
  background: linear-gradient(180deg, var(--c-hi, #fff) 0%, var(--c, #FFF1D6) 50%, var(--c-lo, #F0CC92) 100%);
  border: var(--vs-bw) solid var(--vs-ink);
  box-shadow: var(--vs-inner), var(--vs-drop), var(--vs-soft);
}
.vs-glossy::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 9%;
  right: 9%;
  top: 2px;
  height: 46%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .06));
  pointer-events: none;
}

.vs-press {
  cursor: pointer;
  transition: transform .14s var(--vs-ease), box-shadow .14s var(--vs-ease), filter .14s;
  touch-action: manipulation;
  user-select: none;
}
.vs-press:hover { transform: translateY(-2px); filter: brightness(1.06) saturate(1.06); }
.vs-press:active {
  transform: translateY(calc(var(--vs-lift) - 1px));
  box-shadow: var(--vs-inner), 0 1px 0 var(--vs-ink), 0 4px 8px -3px rgba(40, 16, 4, .45);
  filter: brightness(.97);
}
.vs-press:focus-visible, .vs-tool:focus-visible .vs-tool-disc {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: var(--vs-inner), 0 0 0 7px var(--vs-ink), var(--vs-soft);
}
.vs-press:disabled, .vs-press[aria-disabled="true"] {
  cursor: not-allowed;
  filter: grayscale(.75) brightness(.95);
  transform: none;
  opacity: .8;
}

/* pill button */
.vs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  color: #fff;
  text-shadow: var(--vs-ts-sm);
}
.vs-btn .vs-ico { --s: 24px; }
.vs-btn.sm { min-height: 32px; padding: 0 12px; font-size: 14px; --vs-lift: 3px; }
.vs-btn.sm .vs-ico { --s: 18px; }
.vs-btn.block { width: 100%; }
.vs-btn.c-cream { color: var(--vs-ink); text-shadow: none; }
.vs-btn > .vs-badge { top: -13px; right: -10px; min-width: 22px; height: 22px; padding: 0 5px; font-size: 12px; }
.vs-cost {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 2px;
  padding: 2px 8px 2px 3px;
  border-radius: 999px;
  background: rgba(58, 36, 24, .28);
  box-shadow: inset 0 2px 2px rgba(0, 0, 0, .18);
  font-size: .92em;
}
.vs-cost .vs-ico { --s: 1.2em; }

/* round icon button */
.vs-round {
  display: grid;
  place-items: center;
  width: var(--vs-cam);
  height: var(--vs-cam);
  padding: 0;
  border-radius: 50%;
}
.vs-round > .vs-ico { --s: 62%; }
.vs-round.vs-glossy::before { left: 16%; right: 16%; top: 3px; height: 44%; border-radius: 50%; }

/* counter badge (toolbar, tabs, chips) */
.vs-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 3;
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 999px;
  border: 2.5px solid var(--vs-ink);
  background: linear-gradient(180deg, #FF8371, #E8453C 55%, #B8261F);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 2px 0 var(--vs-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-shadow: var(--vs-ts-sm);
  animation: vs-badge-pulse 2.6s var(--vs-ease) infinite;
}
.vs-badge.is-new {
  min-width: 0;
  height: 22px;
  padding: 0 7px;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #FFE88A, #FFC531 55%, #E58E0E);
  transform: rotate(8deg);
  animation: none;
}

/* status chip */
.vs-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 3px 14px 3px 4px;
  border-radius: 999px;
  --vs-lift: 3px;
  max-width: 100%;
  text-align: left;
}
.vs-chip > .vs-ico { --s: 34px; margin: -6px 0 -6px -6px; filter: drop-shadow(0 2px 0 rgba(58, 36, 24, .35)); }
.vs-chip-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.05; }
.vs-chip-text small {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
  opacity: .9;
}
.vs-chip-text b { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- HUD root ------------------------------------------------------------------------------------------------- */

.vs-hud {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  user-select: none;
}
.vs-hud > * { pointer-events: auto; }
.vs-hud.is-visiting [data-scope="own"], .vs-hud:not(.is-visiting) [data-scope="visit"] { display: none !important; }

/* ---- top-left: wallet, chips, quests -------------------------------------------------------------------------- */

.vs-tl {
  position: absolute;
  top: var(--vs-top);
  left: var(--vs-gutter);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 268px;
  pointer-events: none;
}
.vs-tl > * { pointer-events: auto; }

.vs-coins {
  position: relative;
  display: flex;
  align-items: center;
  height: 46px;
  margin-left: 8px;
  padding: 0 20px 0 54px;
  border-radius: 999px;
  border: var(--vs-bw) solid var(--vs-ink);
  background: linear-gradient(180deg, #8A4C26 0%, #6B3A1E 45%, #4A2613 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .2), inset 0 -3px 0 rgba(0, 0, 0, .3), var(--vs-drop), var(--vs-soft);
}
.vs-coins > .vs-ico {
  --s: 60px;
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-52%);
  filter: drop-shadow(0 3px 0 rgba(58, 36, 24, .45));
}
.vs-coins-n {
  font-size: 27px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-shadow: var(--vs-ts);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.vs-coins.is-bump { animation: vs-bump .45s var(--vs-ease-pop); }
.vs-coins.is-bump > .vs-ico { animation: vs-coin-flip .6s var(--vs-ease); }

.vs-chips { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; max-width: 100%; }
.vs-chip.vs-clock { min-height: 34px; padding-right: 12px; }
.vs-chip.vs-clock > .vs-ico { --s: 30px; }
.vs-clock .vs-chip-text { flex-direction: row; align-items: baseline; gap: 6px; }
.vs-clock .vs-chip-text b { font-size: 15px; }
.vs-clock .vs-chip-text small { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; opacity: .8; }

.vs-weekly { color: #fff; }
.vs-weekly > .vs-ico { --s: 46px; margin: -10px -2px -10px -10px; animation: vs-sway 3.2s ease-in-out infinite; transform-origin: 50% 30%; }
.vs-weekly .vs-chip-text small, .vs-weekly .vs-chip-text b { text-shadow: var(--vs-ts-sm); }
.vs-weekly .vs-chip-text b { font-size: 15px; }
.vs-weekly-bonus {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  border: 2px solid var(--vs-ink);
  background: linear-gradient(180deg, #FFE88A, #FFC531);
  color: var(--vs-ink);
  text-shadow: none;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
}

.vs-build > .vs-ico { --s: 38px; margin: -8px -2px -6px -8px; }
.vs-build .vs-chip-text b { font-variant-numeric: tabular-nums; }
.vs-build-track {
  flex: none;
  width: 58px;
  height: 14px;
  margin-left: 2px;
  border-radius: 999px;
  border: 2px solid var(--vs-ink);
  background: #5B3A26;
  overflow: hidden;
}
.vs-build-track > i {
  display: block;
  height: 100%;
  width: var(--p, 40%);
  border-radius: inherit;
  background: repeating-linear-gradient(135deg, #FFC531 0 7px, #3A2418 7px 11px);
  background-size: 15.6px 15.6px;
  animation: vs-hazard 1s linear infinite;
  transition: width .6s var(--vs-ease);
}

/* quests tracker */
.vs-quests {
  width: 100%;
  border-radius: 20px;
  border: var(--vs-bw) solid var(--vs-ink);
  background:
    radial-gradient(rgba(224, 154, 79, .16) 1.6px, transparent 2px) 0 0 / 16px 16px,
    linear-gradient(180deg, #FFFDF6, #FFEFD2);
  box-shadow: var(--vs-drop), var(--vs-soft);
  overflow: hidden;
}
.vs-quests-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px 6px 6px;
  border: 0;
  border-bottom: var(--vs-bw) solid var(--vs-ink);
  border-radius: 0;
  background: linear-gradient(180deg, var(--c-hi), var(--c) 55%, var(--c-lo));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45);
  cursor: pointer;
  text-align: left;
}
.vs-quests-head > .vs-ico:first-child { --s: 36px; margin: -6px 0 -8px -4px; filter: drop-shadow(0 2px 0 rgba(58, 36, 24, .4)); }
.vs-quests-title { flex: 1; font-size: 19px; font-weight: 700; color: #fff; text-shadow: var(--vs-ts-sm); }
.vs-quests-count {
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(58, 36, 24, .35);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.vs-quests-head > .vs-ico:last-child { --s: 24px; transition: transform .2s var(--vs-ease); }
.vs-quests.is-collapsed .vs-quests-head > .vs-ico:last-child { transform: rotate(180deg); }
.vs-quests.is-collapsed .vs-quest:not(:first-child) { display: none; }
.vs-quests-list { list-style: none; margin: 0; padding: 4px 10px 8px; }
.vs-quest {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 4px;
  padding: 6px 0;
}
.vs-quest + .vs-quest { border-top: 2px dashed rgba(154, 90, 44, .3); }
.vs-quest-dot {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2.5px solid var(--vs-ink);
  background: conic-gradient(#52B848 calc(var(--p, 0) * 1%), #F0DDB8 0);
  box-shadow: 0 2px 0 var(--vs-ink);
}
.vs-quest-dot::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--vs-ink);
  background: #FFF7E8;
}
.vs-quest.is-done .vs-quest-dot { background: linear-gradient(180deg, #96E668, #52B848 60%, #2E8A2B); }
.vs-quest.is-done .vs-quest-dot::after { display: none; }
.vs-quest-dot > .vs-ico { --s: 22px; }
.vs-quest-title { font-size: 15px; font-weight: 700; line-height: 1.1; }
.vs-quest-desc { font-size: 13px; font-weight: 500; color: var(--vs-ink-2); line-height: 1.15; }
.vs-quest-side { grid-row: span 2; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.vs-quest-prog {
  font-size: 14px;
  font-weight: 700;
  color: var(--vs-wood-dk);
  font-variant-numeric: tabular-nums;
}
.vs-reward { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--vs-wood-dk); }
.vs-reward span { display: inline-flex; align-items: center; gap: 2px; }
.vs-reward .vs-ico { --s: 17px; }
.vs-quest .vs-btn.sm { animation: vs-glow 1.6s ease-in-out infinite; }

/* ---- top-centre: level star + XP ------------------------------------------------------------------------------ */

.vs-level {
  position: absolute;
  top: var(--vs-top);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  width: min(380px, 34vw);
  min-width: 300px;
}
.vs-lvl-star {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin: -6px -22px -6px 0;
  flex: none;
}
.vs-lvl-star > .vs-ico { --s: 100%; position: absolute; inset: 0; filter: drop-shadow(0 4px 0 rgba(58, 36, 24, .5)); }
.vs-lvl-star b {
  position: relative;
  margin-top: 6px;
  font-size: 27px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-shadow: var(--vs-ts);
}
.vs-lvl-star::before {
  content: "";
  position: absolute;
  inset: -26px;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 226, 122, .85) 0 10deg, transparent 10deg 30deg);
  -webkit-mask: radial-gradient(circle, #000 25%, transparent 70%);
  mask: radial-gradient(circle, #000 25%, transparent 70%);
  opacity: 0;
  transform: scale(.4);
  pointer-events: none;
}
.vs-lvl-star.is-pop > .vs-ico, .vs-lvl-star.is-pop b { animation: vs-pop .7s var(--vs-ease-pop); }
.vs-lvl-star.is-pop::before { animation: vs-burst 1.1s var(--vs-ease) forwards; }

.vs-xp { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vs-xp-nick {
  align-self: flex-start;
  margin-left: 30px;
  padding: 1px 12px 2px;
  border-radius: 10px 10px 0 0;
  border: var(--vs-bw) solid var(--vs-ink);
  border-bottom: 0;
  margin-bottom: -6px;
  background: linear-gradient(180deg, #FFFFFF, #FFF1D6);
  font-size: 13px;
  font-weight: 700;
  color: var(--vs-wood-dk);
  max-width: calc(100% - 40px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vs-xp-bar {
  position: relative;
  height: 36px;
  border-radius: 999px;
  border: var(--vs-bw) solid var(--vs-ink);
  background: linear-gradient(180deg, #4A2613, #6B3A1E);
  box-shadow: inset 0 4px 6px rgba(0, 0, 0, .45), var(--vs-drop), var(--vs-soft);
  overflow: hidden;
}
.vs-xp-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  min-width: 26px;
  border-radius: 999px;
  background: linear-gradient(180deg, #B4F58A 0%, #6ACD4C 45%, #3E9C33 100%);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .16), 2px 0 0 var(--vs-ink);
  transition: width .8s var(--vs-ease);
  overflow: hidden;
}
.vs-xp-fill::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 3px;
  height: 36%;
  border-radius: 999px;
  background: rgba(255, 255, 255, .62);
}
.vs-xp-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .18) 0 10px, transparent 10px 22px);
  background-size: 48px 100%;
  animation: vs-stripes 1.8s linear infinite;
}
.vs-xp-bar.is-gaining .vs-xp-fill { filter: brightness(1.18) saturate(1.2); }
.vs-xp-bar.is-gaining .vs-xp-fill::after { animation-duration: .5s; }
.vs-xp-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-left: 16px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-shadow: var(--vs-ts-sm);
  font-variant-numeric: tabular-nums;
}

/* ---- top-right: café plaque ----------------------------------------------------------------------------------- */

.vs-tr {
  position: absolute;
  top: var(--vs-top);
  right: var(--vs-gutter);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.vs-plaque {
  position: relative;
  display: block;
  min-width: 232px;
  max-width: 300px;
  margin-top: 8px;
  padding: 7px;
  border-radius: 18px;
  border: var(--vs-bw) solid var(--vs-ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 40%, rgba(0, 0, 0, .14)),
    repeating-linear-gradient(177deg, #DE9450 0 5px, #CC7D3D 5px 8px, #E39B57 8px 14px, #D3864A 14px 17px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), inset 0 -3px 0 rgba(0, 0, 0, .2), var(--vs-drop), var(--vs-soft);
  text-align: left;
}
button.vs-plaque { cursor: pointer; }
.vs-plaque-board {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 14px 7px;
  border-radius: 11px;
  border: 2.5px solid var(--vs-ink);
  background: linear-gradient(180deg, #FFFDF6, #FFEFD0);
  box-shadow: inset 0 -3px 0 rgba(224, 154, 79, .3);
}
.vs-plaque-name {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.05;
  color: var(--vs-wood-dk);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vs-plaque-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-right: 14px; }
.vs-stars { display: inline-flex; gap: 0; }
.vs-stars .vs-ico { --s: 22px; margin-right: -2px; }
.vs-likes { display: inline-flex; align-items: center; gap: 3px; font-size: 16px; font-weight: 700; color: #C7345B; }
.vs-likes .vs-ico { --s: 22px; }
.vs-plaque-tag {
  position: absolute;
  top: -15px;
  left: 16px;
  z-index: 2;
  padding: 2px 11px 3px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .03em;
  --vs-lift: 2px;
}
.vs-nail {
  position: absolute;
  top: 3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--vs-ink);
  background: radial-gradient(circle at 35% 35%, #FFF3C4, #D9A43A 60%, #9A6A1C);
}
.vs-nail.l { left: 4px; }
.vs-nail.r { right: 4px; }
.vs-plaque-edit {
  position: absolute;
  right: -10px;
  bottom: -10px;
  --vs-cam: 34px;
  --vs-lift: 2px;
}
.vs-plaque:hover .vs-plaque-edit { transform: rotate(-12deg) scale(1.08); }

.vs-watchers { min-height: 34px; padding: 5px 14px 5px 10px; gap: 7px; }
.vs-watchers > .vs-ico { --s: 24px; margin: 0; }
.vs-faces { display: inline-flex; margin-right: 2px; }
.vs-faces .vs-ico { --s: 26px; margin-left: -8px; filter: drop-shadow(0 1px 0 var(--vs-ink)); }
.vs-faces .vs-ico:first-child { margin-left: 0; }
.vs-watchers .vs-chip-text b { font-size: 14px; }

/* Aberto/Fechado (cafe.open): a small toggle under the plaque; a visited café shows it only while closed, not clickable */
.vs-chip.vs-open { min-height: 34px; padding: 5px 16px 5px 10px; gap: 7px; cursor: pointer; }
.vs-chip.vs-open > .vs-ico { --s: 24px; margin: 0; }
.vs-chip.vs-open .vs-chip-text b { font-size: 14px; }
.vs-chip.vs-open .vs-chip-text small { text-transform: none; letter-spacing: 0; font-size: 11px; font-weight: 700; }
.vs-chip.vs-open.is-static { cursor: default; pointer-events: none; }

/* ---- visiting header ------------------------------------------------------------------------------------------ */

.vs-visit {
  position: absolute;
  top: calc(var(--vs-top) + 80px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 6px 6px;
  border-radius: 999px;
  color: #fff;
  animation: vs-drop-in .45s var(--vs-ease-pop);
}
.vs-visit > .vs-avatar-face { --s: 52px; margin: -10px 0 -10px -10px; filter: drop-shadow(0 3px 0 rgba(58, 36, 24, .45)); }
.vs-visit-text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.vs-visit-text small {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #F3E6FF;
}
.vs-visit-text b { font-size: 21px; font-weight: 700; text-shadow: var(--vs-ts-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-visit-meta { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #F3E6FF; }
.vs-visit-meta .vs-stars .vs-ico { --s: 16px; }
.vs-visit .vs-btn { margin-left: 4px; }

/* ---- right edge: camera rail ---------------------------------------------------------------------------------- */

/* bottom-right column: the rail stands right above the dock, sharing its right edge */
.vs-cam {
  position: absolute;
  right: var(--vs-gutter);
  bottom: calc(var(--vs-bottom) + var(--vs-dock-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.vs-cam .vs-round { --vs-lift: 3px; }
.vs-cam-q { position: relative; }
.vs-cam-q small {
  position: absolute;
  left: 50%;
  bottom: -9px;
  transform: translateX(-50%);
  padding: 0 6px;
  border-radius: 999px;
  border: 2px solid var(--vs-ink);
  background: #FFF7E8;
  color: var(--vs-ink);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

/* ---- neighbours bar ------------------------------------------------------------------------------------------- */

.vs-nbar {
  position: absolute;
  left: 50%;
  bottom: calc(var(--vs-bottom) + 114px);
  transform: translateX(-50%);
  width: min(900px, calc(100vw - 2 * var(--vs-gutter) - 2 * var(--vs-cam) - 24px));
  padding: 14px 10px 10px;
  border-radius: 22px;
  border: var(--vs-bw) solid var(--vs-ink);
  background:
    radial-gradient(rgba(255, 255, 255, .5) 1.4px, transparent 1.8px) 0 0 / 14px 14px,
    linear-gradient(180deg, #CDF3F0 0%, #9FE3DE 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .6), var(--vs-drop), var(--vs-soft);
  animation: vs-rise .35s var(--vs-ease-pop);
}
.vs-nbar-tab {
  position: absolute;
  top: -18px;
  left: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 14px 4px 6px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 700;
  --vs-lift: 3px;
}
.vs-nbar-tab .vs-ico { --s: 28px; margin: -6px 0 -6px -4px; }
.vs-nbar-actions { position: absolute; top: -20px; right: 14px; display: flex; gap: 8px; }
.vs-nbar-actions .vs-btn { position: relative; }
.vs-nbar-row { display: flex; align-items: center; gap: 6px; }
.vs-nbar-list {
  flex: 1;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding: 6px 4px 4px;
}
.vs-nbar-list::-webkit-scrollbar { display: none; }
.vs-nbar .vs-round { --vs-cam: 36px; --vs-lift: 3px; flex: none; }
.vs-nb {
  position: relative;
  flex: none;
  width: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 2px 0;
  border: 0;
  background: none;
  cursor: pointer;
  scroll-snap-align: start;
}
.vs-nb-face { position: relative; transition: transform .16s var(--vs-ease); }
.vs-nb-face > .vs-avatar-face { --s: 58px; filter: drop-shadow(0 3px 0 var(--vs-ink)); }
.vs-nb:hover .vs-nb-face { transform: translateY(-4px) rotate(-3deg); }
.vs-nb:active .vs-nb-face { transform: translateY(2px) scale(.96); }
.vs-nb-lvl {
  position: absolute;
  right: -8px;
  bottom: -6px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
}
.vs-nb-lvl > .vs-ico { --s: 100%; position: absolute; inset: 0; }
.vs-nb-lvl b { position: relative; margin-top: 3px; font-size: 12px; font-weight: 700; color: #fff; text-shadow: var(--vs-ts-sm); }
.vs-nb-on {
  position: absolute;
  left: 1px;
  top: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2.5px solid var(--vs-ink);
  background: radial-gradient(circle at 35% 35%, #C6FF9E, #52B848 65%);
}
.vs-nb-help {
  position: absolute;
  left: -10px;
  bottom: -2px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  --vs-bw: 2.5px;
  --vs-lift: 2px;
  animation: vs-bob 1.4s ease-in-out infinite;
}
.vs-nb-help .vs-ico { --s: 20px; }
.vs-nb-nick {
  max-width: 100%;
  font-size: 13px;
  font-weight: 700;
  color: var(--vs-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vs-nb.is-invite .vs-nb-face {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 3px dashed var(--vs-ink);
  background: rgba(255, 255, 255, .55);
}
.vs-nb.is-invite .vs-nb-face .vs-ico { --s: 40px; }

/* ---- bottom dock ---------------------------------------------------------------------------------------------- */

/* bottom-right corner (the zoom rail stands above it, same right edge). "Porcelana": a glazed cream plate (the panels'
   paper) set in a caramel rim like the plaque's wooden frame, a painted teal glaze line, a narrow glaze sheen along the
   top and two brass nail heads (as on the plaque); dark-ink labels. The build bar (decorate mode) is the same plate.
   Sizes live in the --dock-* variables, so the breakpoints only change those. */
.vs-dock {
  --dock-r: 28px;          /* outer corner radius */
  --dock-rim: 4px;         /* caramel rim inside the ink border */
  --dock-trim-at: 7px;     /* teal glaze line: inset from the border… */
  --dock-trim: 3px;        /* …and its width */
  --dock-nail: 12.5px;     /* nail centre, from each top corner (on the glaze line's corner) */
  --dock-plate: #FAE8C6;   /* plate colour at the labels' height (the line breaks around the open-panel pip) */
  position: absolute;
  right: var(--vs-gutter);
  bottom: var(--vs-bottom);
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  /* the discs start 6px under the glaze line (room for the active ring: 3px white + 2px ink + 1px of plate), the
     labels stand right on it. --vs-dock-h (the rail's offset) follows from this padding */
  padding: calc(var(--dock-trim-at) + var(--dock-trim) + 6px) 16px calc(var(--dock-trim-at) + var(--dock-trim));
  border-radius: var(--dock-r);
  border: var(--vs-bw) solid var(--vs-ink);
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF7E6 40%, #F8E3BE 100%);
  box-shadow:
    inset 0 2px 0 #FFD9A1,                                          /* lit top edge of the rim */
    inset 0 -2px 0 #B8702F,                                         /* shaded bottom edge of the rim */
    inset 0 0 0 var(--dock-rim) #DE9B55,                            /* caramel rim (the plaque's wood tone) */
    inset 0 0 0 calc(var(--dock-rim) + 1px) rgba(126, 67, 27, .38), /* where the rim meets the plate */
    var(--vs-drop), var(--vs-soft);
}
.vs-dock::before, .vs-dock::after { content: ""; position: absolute; z-index: -1; pointer-events: none; }
/* the teal glaze line, a little painted azulejo scallop (half-flower + two dots) on it at each short end, and the
   glaze sheen running along the top of the plate. --dock-orn: the scallops' colour (transparent = none) */
.vs-dock::before {
  --dock-dot: radial-gradient(circle 2.6px, var(--dock-orn, var(--vs-teal)) 1.9px, transparent 2.5px) no-repeat;
  --dock-dot-y: 10px;
  inset: var(--dock-trim-at);
  border: var(--dock-trim) solid var(--vs-teal);
  border-radius: calc(var(--dock-r) - var(--vs-bw) - var(--dock-trim-at));
  background:
    radial-gradient(circle 2.4px at 0 50%, var(--dock-orn-hi, #FFF7E6) 1.6px, transparent 2.3px) no-repeat,
    radial-gradient(circle 2.4px at 100% 50%, var(--dock-orn-hi, #FFF7E6) 1.6px, transparent 2.3px) no-repeat,
    radial-gradient(circle 6px at 0 50%, var(--dock-orn, var(--vs-teal)) 5.2px, transparent 5.8px) no-repeat,
    radial-gradient(circle 6px at 100% 50%, var(--dock-orn, var(--vs-teal)) 5.2px, transparent 5.8px) no-repeat,
    var(--dock-dot) 0 calc(50% - var(--dock-dot-y)) / 6px 6px, var(--dock-dot) 0 calc(50% + var(--dock-dot-y)) / 6px 6px,
    var(--dock-dot) 100% calc(50% - var(--dock-dot-y)) / 6px 6px, var(--dock-dot) 100% calc(50% + var(--dock-dot-y)) / 6px 6px,
    radial-gradient(closest-side, rgba(255, 255, 255, .78) 62%, rgba(255, 255, 255, 0)) 50% 2px / calc(100% - 16px) 8px no-repeat;
}
/* two brass nail heads in the top corners, like the plaque's */
.vs-dock::after {
  inset: 0;
  background:
    radial-gradient(circle 1.8px at calc(var(--dock-nail) - 1.3px) calc(var(--dock-nail) - 1.3px), #FFF8DC 50%, transparent),
    radial-gradient(circle 1.8px at calc(100% - var(--dock-nail) - 1.3px) calc(var(--dock-nail) - 1.3px), #FFF8DC 50%, transparent),
    radial-gradient(circle 5.6px at var(--dock-nail) var(--dock-nail), #EDBE55 0 1.6px, #A8721F 3.5px, var(--vs-ink) 3.8px 5.1px, transparent 5.6px),
    radial-gradient(circle 5.6px at calc(100% - var(--dock-nail)) var(--dock-nail), #EDBE55 0 1.6px, #A8721F 3.5px, var(--vs-ink) 3.8px 5.1px, transparent 5.6px);
}
.vs-dock-sep {
  align-self: stretch;
  width: 3px;
  margin: 6px 6px 24px;
  border-radius: 999px;
  background: var(--vs-teal);
  opacity: .5;
}
.vs-tool {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  width: 82px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
  outline: none;
}
.vs-tool-disc {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--vs-disc);
  height: var(--vs-disc);
  border-radius: 50%;
  transition: transform .18s var(--vs-ease-pop), box-shadow .14s var(--vs-ease), filter .14s;
}
.vs-tool-disc.vs-glossy::before { left: 15%; right: 15%; top: 3px; height: 44%; border-radius: 50%; }
.vs-tool-disc > .vs-ico { --s: 74%; filter: drop-shadow(0 2px 0 rgba(58, 36, 24, .35)); }
.vs-tool-label {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  color: var(--vs-ink);
  text-shadow: 0 1.5px 0 rgba(255, 255, 255, .9);
}
.vs-tool:hover .vs-tool-disc { transform: translateY(-6px) rotate(-5deg) scale(1.06); filter: brightness(1.07) saturate(1.08); }
.vs-tool:hover .vs-tool-disc > .vs-ico { animation: vs-wiggle .5s var(--vs-ease); }
.vs-tool:active .vs-tool-disc {
  transform: translateY(3px) scale(.95);
  box-shadow: var(--vs-inner), 0 1px 0 var(--vs-ink), 0 4px 8px -3px rgba(40, 16, 4, .45);
}
/* active tool (its panel/mode is open): a white + ink ring and a warm glow (the only active-ring rule). The disc stays
   put, so the ring ends 1px under the plate's glaze line (see the dock's top padding) instead of crossing it */
.vs-tool[aria-pressed="true"] .vs-tool-disc, .vs-tool.is-active .vs-tool-disc {
  transform: none;
  box-shadow: var(--vs-inner), 0 0 0 3px #fff, 0 0 0 5px var(--vs-ink), 0 0 20px 7px rgba(255, 226, 122, .85);
}
/* deep glaze teal: ≈5.5:1 on the cream plate (the ring and the pip carry the state too) */
.vs-tool[aria-pressed="true"] .vs-tool-label, .vs-tool.is-active .vs-tool-label { color: #08706D; }
/* toggled side area (Vizinhos) is open: a small gold pip set on the glaze line, which breaks around it */
.vs-tool[aria-expanded="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(-3.5px - var(--dock-trim, 3px) / 2);
  width: 20px;
  height: 7px;
  margin-left: -10px;
  border-radius: 999px;
  border: 2px solid var(--vs-ink);
  background: var(--vs-gold-text);
  box-shadow: 0 0 0 2px var(--dock-plate, #FAE8C6);
}
.vs-tool .vs-badge { top: -6px; right: 2px; }
.vs-tool:disabled { cursor: not-allowed; }
.vs-tool:disabled .vs-tool-disc { filter: grayscale(.8) brightness(.9); transform: none; }

/* ---- toasts --------------------------------------------------------------------------------------------------- */

.vs-toasts {
  position: fixed;
  z-index: 60;
  top: calc(var(--vs-top) + 66px);
  left: 50%;
  transform: translateX(-50%);
  width: min(470px, calc(100vw - 2 * var(--vs-gutter)));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.vs-hud.is-visiting ~ .vs-toasts { top: calc(var(--vs-top) + 158px); }
.vs-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-height: 48px;
  padding: 5px 18px 5px 5px;
  border-radius: 999px;
  border: var(--vs-bw) solid var(--vs-ink);
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF4DE 100%);
  box-shadow: inset 0 -3px 0 rgba(224, 154, 79, .25), var(--vs-drop), var(--vs-soft);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--vs-ink);
  cursor: pointer;
  animation: vs-toast-in .42s var(--vs-ease-pop) both;
}
.vs-toast b { font-weight: 700; }
.vs-toast-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  --vs-bw: 2.5px;
  --vs-lift: 2px;
}
.vs-toast-ico.vs-glossy::before { left: 16%; right: 16%; border-radius: 50%; }
.vs-toast-ico > .vs-ico { --s: 30px; }
.vs-toast-amt { font-weight: 700; color: #B8261F; }
.vs-toast.is-reward .vs-toast-amt { color: #C76E00; }
.vs-toast.is-leaving { animation: vs-toast-out .3s var(--vs-ease) forwards; }

/* floating "+N" from the wallet / XP bar */
.vs-float {
  position: fixed;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--vs-font);
  font-size: 22px;
  font-weight: 700;
  color: var(--vs-gold-text);
  text-shadow: var(--vs-ts);
  pointer-events: none;
  animation: vs-float-up 1.2s var(--vs-ease) forwards;
}
.vs-float.is-xp { color: #B4F58A; }
.vs-float .vs-ico { --s: 26px; }

/* ---- panels --------------------------------------------------------------------------------------------------- */

.vs-scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: radial-gradient(ellipse at center, rgba(58, 36, 24, .15), rgba(58, 36, 24, .55));
  animation: vs-fade .25s ease both;
}
.vs-panel {
  position: fixed;
  z-index: 50;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -48%);
  display: flex;
  flex-direction: column;
  width: min(860px, calc(100vw - 2 * var(--vs-gutter)));
  max-height: min(620px, calc(100vh - 2 * var(--vs-top) - 40px));
  border-radius: 30px;
  border: 4px solid var(--vs-ink);
  background:
    radial-gradient(rgba(224, 154, 79, .16) 2px, transparent 2.6px) 0 0 / 22px 22px,
    linear-gradient(180deg, #FFF9EC, #FFEFD2);
  box-shadow: 0 6px 0 var(--vs-ink), 0 30px 60px -10px rgba(40, 16, 4, .6);
  animation: vs-panel-in .42s var(--vs-ease-pop) both;
}
.vs-panel-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 70px 12px 16px;
  border-radius: 26px 26px 0 0;
  border-bottom: 4px solid var(--vs-ink);
  background: linear-gradient(180deg, var(--c-hi), var(--c) 55%, var(--c-lo));
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), inset 0 -4px 0 rgba(0, 0, 0, .15);
}
.vs-panel-head::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 80px;
  top: 4px;
  height: 36%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.vs-panel-head > .vs-ico { --s: 58px; margin: -16px 0 -14px -4px; filter: drop-shadow(0 3px 0 rgba(58, 36, 24, .45)); }
.vs-panel-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.05; }
.vs-panel-title h2 { margin: 0; font-size: 28px; font-weight: 700; color: #fff; text-shadow: var(--vs-ts); }
.vs-panel-title p {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-shadow: var(--vs-ts-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vs-panel-head .vs-coins { margin-left: auto; height: 40px; padding: 0 16px 0 46px; --vs-lift: 3px; }
.vs-panel-head .vs-coins > .vs-ico { --s: 50px; left: -10px; }
.vs-panel-head .vs-coins-n { font-size: 22px; }
.vs-close {
  position: absolute;
  top: -16px;
  right: -16px;
  z-index: 3;
  --vs-cam: 50px;
}
.vs-close:hover { transform: rotate(90deg) scale(1.05); }

.vs-tabs {
  display: flex;
  flex: none;
  gap: 8px;
  padding: 14px 16px 14px;
  margin-bottom: -10px; /* room for the buttons' drop shadow, which the scrolling strip would cut */
  overflow-x: auto;
  scrollbar-width: none;
}
.vs-tabs::-webkit-scrollbar { display: none; }
.vs-tab {
  position: relative;
  flex: none;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  color: var(--vs-wood-dk);
  --vs-lift: 3px;
}
.vs-tab[aria-selected="true"] { color: #fff; text-shadow: var(--vs-ts-sm); transform: translateY(-2px); }

.vs-panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 18px 20px;
  scrollbar-width: thin;
  scrollbar-color: #C98A4B transparent;
}
.vs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 18px 14px;
}
.vs-panel-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 6px 12px 6px 6px;
  border-radius: 14px;
  border: 2.5px dashed rgba(154, 90, 44, .55);
  background: rgba(255, 255, 255, .6);
  font-size: 14px;
  font-weight: 600;
  color: var(--vs-ink-2);
}
.vs-panel-note .vs-ico { --s: 28px; }

/* card */
.vs-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 9px 9px 11px;
  border-radius: 22px;
  border: var(--vs-bw) solid var(--vs-ink);
  background: linear-gradient(180deg, #FFFFFF, #FFF5E2);
  box-shadow: inset 0 -3px 0 rgba(224, 154, 79, .25), 0 4px 0 var(--vs-ink), 0 10px 16px -8px rgba(40, 16, 4, .45);
  transition: transform .16s var(--vs-ease);
}
.vs-card:hover { transform: translateY(-3px) rotate(-.4deg); }
.vs-card-art {
  position: relative;
  display: grid;
  place-items: center;
  height: 104px;
  border-radius: 16px;
  border: 2.5px solid var(--vs-ink);
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 55%),
    radial-gradient(ellipse at 50% 120%, var(--c-lo), var(--c) 55%, var(--c-hi));
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .12);
  overflow: hidden;
}
.vs-card-art::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 9px;
  height: 12px;
  border-radius: 50%;
  background: rgba(58, 36, 24, .22);
}
.vs-card-art > .vs-ico, .vs-card-art > img { position: relative; z-index: 1; --s: 84px; width: var(--s); height: var(--s); object-fit: contain; }
.vs-card:hover .vs-card-art > .vs-ico { animation: vs-wiggle .5s var(--vs-ease); }
.vs-card h3 { margin: 0 2px; font-size: 16px; font-weight: 700; line-height: 1.1; color: var(--vs-ink); }
.vs-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.vs-stats li {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px 2px 3px;
  border-radius: 999px;
  background: #FFF0D2;
  box-shadow: inset 0 0 0 1.5px rgba(154, 90, 44, .35);
  font-size: 13px;
  font-weight: 600;
  color: var(--vs-ink-2);
  white-space: nowrap;
}
.vs-stats .vs-ico { --s: 18px; }
.vs-stats .is-up { color: #B8261F; font-weight: 700; }
.vs-card .vs-btn { margin-top: auto; }
.vs-card-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 12px 3px 4px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  color: #fff;
  text-shadow: var(--vs-ts-sm);
  --vs-lift: 2px;
}
.vs-card-tag .vs-ico { --s: 24px; margin: -6px 0; }
.vs-card .vs-badge.is-new { top: 4px; right: 4px; }
.vs-card.is-weekly {
  background: linear-gradient(180deg, #FFFBE6, #FFE9B0);
  box-shadow: 0 0 0 4px #FFC531, 0 0 0 6.5px var(--vs-ink), 0 6px 0 2.5px var(--vs-ink), 0 0 26px 10px rgba(255, 197, 49, .55);
}
.vs-card.is-locked .vs-card-art > .vs-ico { filter: grayscale(1) brightness(1.08) contrast(.7); opacity: .55; }
.vs-card.is-locked .vs-card-art { background: radial-gradient(ellipse at 50% 120%, #B9A58A, #D9CBB4 55%, #EFE5D4); }
.vs-card-lock {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  inset: 0;
}
.vs-card-lock .vs-ico { --s: 48px; filter: drop-shadow(0 3px 0 rgba(58, 36, 24, .4)); }
.vs-card.is-locked h3, .vs-card.is-locked .vs-stats { opacity: .7; }
.vs-owned { font-size: 12.5px; font-weight: 700; color: var(--vs-teal); margin: -2px 2px 0; }

/* ---- motion --------------------------------------------------------------------------------------------------- */

@keyframes vs-bump { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes vs-coin-flip {
  0% { transform: translateY(-52%) rotateY(0); }
  50% { transform: translateY(-70%) rotateY(180deg) scale(1.12); }
  100% { transform: translateY(-52%) rotateY(360deg); }
}
@keyframes vs-pop { 0% { transform: scale(1); } 35% { transform: scale(1.35) rotate(-8deg); } 70% { transform: scale(.94); } 100% { transform: scale(1); } }
@keyframes vs-burst { 0% { opacity: 0; transform: scale(.4) rotate(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.5) rotate(60deg); } }
@keyframes vs-stripes { to { background-position: 48px 0; } }
@keyframes vs-hazard { to { background-position: 15.6px 0; } }
@keyframes vs-badge-pulse { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(1.2); } 90% { transform: scale(.95); } }
@keyframes vs-sway { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes vs-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes vs-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-10deg); } 60% { transform: rotate(8deg); } }
@keyframes vs-glow { 0%, 100% { box-shadow: var(--vs-inner), var(--vs-drop), 0 0 0 0 rgba(150, 230, 104, 0); } 50% { box-shadow: var(--vs-inner), var(--vs-drop), 0 0 14px 5px rgba(150, 230, 104, .9); } }
@keyframes vs-toast-in { 0% { opacity: 0; transform: translateY(-18px) scale(.85); } 100% { opacity: 1; transform: none; } }
@keyframes vs-toast-out { to { opacity: 0; transform: translateY(-12px) scale(.92); } }
@keyframes vs-float-up { 0% { opacity: 0; transform: translateY(6px) scale(.7); } 15% { opacity: 1; transform: translateY(0) scale(1.1); } 100% { opacity: 0; transform: translateY(-46px) scale(1); } }
@keyframes vs-panel-in { 0% { opacity: 0; transform: translate(-50%, -40%) scale(.88); } 100% { opacity: 1; transform: translate(-50%, -48%) scale(1); } }
@keyframes vs-sheet-in { 0% { transform: translateY(100%); } 100% { transform: none; } }
@keyframes vs-drop-in { 0% { opacity: 0; transform: translate(-50%, -24px); } 100% { opacity: 1; transform: translate(-50%, 0); } }
@keyframes vs-rise { 0% { opacity: 0; transform: translate(-50%, 18px); } 100% { opacity: 1; transform: translate(-50%, 0); } }
@keyframes vs-fade { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .vs-hud *, .vs-hud *::before, .vs-hud *::after, .vs-panel, .vs-panel *, .vs-toast, .vs-float, .vs-scrim {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---- responsive ----------------------------------------------------------------------------------------------- */

/* narrow landscape / small laptops */
@media (max-width: 1100px) {
  .vs-tl { width: 236px; }
  .vs-level { width: 300px; min-width: 0; }
  .vs-plaque { min-width: 200px; }
}
@media (max-width: 900px) {
  :root { --vs-disc: 54px; --vs-dock-h: 103px; }
  .vs-tool { width: 70px; }
  .vs-tool-label { font-size: 13px; }
  .vs-level { left: calc(var(--vs-gutter) + 236px + 14px); transform: none; width: auto; right: calc(var(--vs-gutter) + 230px); }
}

/* short screens (phone landscape) */
@media (max-height: 560px) {
  :root { --vs-disc: 46px; --vs-cam: 40px; --vs-top: calc(8px + env(safe-area-inset-top, 0px)); --vs-dock-h: 90px; }
  .vs-dock { --dock-r: 24px; --dock-rim: 3px; --dock-trim-at: 5.5px; --dock-trim: 2.5px; --dock-nail: 11px; padding-left: 10px; padding-right: 10px; }
  .vs-tool { width: 62px; }
  .vs-tool-label { font-size: 12px; }
  .vs-cam { gap: 8px; }
  .vs-quests .vs-quest:not(:first-child) { display: none; }
  .vs-chips .vs-build, .vs-chips .vs-clock { display: none; }
  .vs-nbar { bottom: calc(var(--vs-bottom) + 86px); padding-top: 12px; }
  .vs-nb { width: 66px; }
  .vs-nb-face > .vs-avatar-face { --s: 44px; }
  .vs-nb.is-invite .vs-nb-face { width: 44px; height: 44px; }
}

/* phones, portrait */
@media (max-width: 640px) {
  :root {
    --vs-gutter: 10px;
    --vs-disc: 52px;
    --vs-cam: 42px;
    --vs-bw: 2.5px;
  }
  /* row 1: wallet (left) + level/XP (right) · row 2: chips (left) + plaque (right) */
  .vs-tl { width: auto; max-width: calc(52vw - var(--vs-gutter)); gap: 8px; }
  .vs-coins { height: 40px; padding: 0 14px 0 44px; margin-left: 6px; }
  .vs-coins > .vs-ico { --s: 50px; left: -12px; }
  .vs-coins-n { font-size: 22px; }
  .vs-chips { gap: 7px; }
  .vs-chip { min-height: 34px; padding: 2px 10px 2px 3px; gap: 6px; }
  .vs-chip-text small { font-size: 10px; }
  .vs-chip-text b { font-size: 14px; }
  .vs-weekly > .vs-ico { --s: 38px; margin: -8px -2px -8px -8px; }
  .vs-weekly .vs-chip-text b { max-width: 96px; }
  .vs-weekly-bonus { display: none; }
  .vs-build > .vs-ico { --s: 32px; }
  .vs-build-track { display: none; }
  .vs-quests { width: calc(100vw - 2 * var(--vs-gutter) - var(--vs-cam) - 14px); max-width: 300px; }
  /* phones keep only the top quest on screen; the Missões button opens the full list */
  .vs-quests .vs-quest:not(:first-child) { display: none; }
  .vs-quests-title { font-size: 16px; }
  .vs-quests-head > .vs-ico:first-child { --s: 30px; }
  .vs-quest-title { font-size: 14px; }
  .vs-quest-desc { font-size: 12px; }

  .vs-level {
    left: auto;
    right: var(--vs-gutter);
    transform: none;
    width: calc(100vw - 2 * var(--vs-gutter) - 168px);
    min-width: 0;
  }
  .vs-lvl-star { width: 56px; height: 56px; margin: -4px -18px -4px 0; }
  .vs-lvl-star b { font-size: 21px; margin-top: 4px; }
  .vs-xp-nick { display: none; }
  .vs-xp-bar { height: 30px; }
  .vs-xp-label { font-size: 12.5px; padding-left: 14px; }

  .vs-tr { top: calc(var(--vs-top) + 54px); gap: 8px; max-width: calc(48vw - var(--vs-gutter)); }
  .vs-plaque { min-width: 0; max-width: 100%; padding: 5px; border-radius: 15px; }
  .vs-plaque-board { padding: 6px 10px 5px; }
  .vs-plaque-name { font-size: 16px; }
  .vs-plaque-meta { gap: 6px; }
  .vs-stars .vs-ico { --s: 16px; }
  .vs-likes { font-size: 13px; }
  .vs-likes .vs-ico { --s: 17px; }
  .vs-plaque-tag { font-size: 11px; top: -13px; left: 10px; }
  .vs-plaque-edit { --vs-cam: 28px; right: -8px; bottom: -8px; }
  /* visiting: the owner's nick and level take their own line, the stars and likes the next one */
  .vs-hud.is-visiting .vs-plaque-meta { flex-wrap: wrap; row-gap: 2px; }
  .vs-hud.is-visiting .vs-plaque-owner { flex: 1 0 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .vs-watchers .vs-chip-text { display: none; }
  .vs-watchers { padding-right: 10px; }

  .vs-hud.is-visiting .vs-tr { display: none; }
  .vs-visit {
    top: calc(var(--vs-top) + 54px);
    left: auto;
    right: var(--vs-gutter);
    transform: none;
    max-width: calc(100vw - 2 * var(--vs-gutter) - 150px);
    gap: 8px;
    padding: 5px 6px 5px 5px;
    border-radius: 22px;
    flex-wrap: wrap;
    animation: none;
  }
  .vs-visit > .vs-avatar-face { --s: 40px; margin: -6px 0 -6px -6px; }
  .vs-visit-text { flex: 1; }
  .vs-visit-text b { font-size: 16px; }
  .vs-visit .vs-btn { flex-basis: 100%; margin: 0; }

  /* --vs-build-h: the build bar's bigger discs make it taller; the rail keeps its 16px gap above it in decorate mode,
     and the docked shop (game.css) stands on it */
  :root { --vs-dock-h: 89px; --vs-build-h: 95px; }
  .vs-hud.is-build { --vs-dock-h: var(--vs-build-h); }
  /* the rail: bottom-right, just above the dock, over the street in front of the café, not over its right wall */
  .vs-cam { gap: 9px; }
  .vs-cam [data-cam="full"] { display: none; }

  /* compact, right-aligned dock: the left half of the bottom edge stays on the café */
  .vs-dock {
    --vs-disc: 46px;
    --dock-r: 24px;
    --dock-rim: 3px;
    --dock-trim-at: 5.5px;
    --dock-trim: 2.5px;
    --dock-nail: 11px;
    padding-left: 11px;
    padding-right: 11px;
  }
  .vs-dock-sep { display: none; }
  .vs-tool { width: 56px; }
  .vs-tool-label { font-size: 12.5px; }
  /* decorate mode keeps its five buttons across the whole bottom edge (no room for the end scallops there) */
  .vs-dock.vs-buildbar {
    --vs-disc: 52px;
    --dock-orn: transparent;
    --dock-orn-hi: transparent;
    left: var(--vs-gutter);
    display: grid;
    column-gap: 0;
    padding-left: 8px;
    padding-right: 8px;
  }

  .vs-nbar {
    left: var(--vs-gutter);
    right: var(--vs-gutter);
    width: auto;
    transform: none;
    bottom: calc(var(--vs-bottom) + 174px);
    padding: 14px 6px 6px;
    animation: none;
  }
  .vs-hud.is-visiting .vs-nbar { bottom: calc(var(--vs-bottom) + 102px); }
  .vs-nbar-tab { font-size: 15px; left: 10px; }
  .vs-nbar-actions { right: 8px; }
  .vs-nbar-actions .vs-btn.sm { padding: 0 9px; font-size: 13px; }
  .vs-nbar-row > .vs-round { display: none; }
  .vs-nb { width: 68px; }
  .vs-nb-face > .vs-avatar-face { --s: 48px; }
  .vs-nb.is-invite .vs-nb-face { width: 48px; height: 48px; }
  .vs-nb-nick { font-size: 12px; }

  .vs-toasts {
    top: auto;
    bottom: calc(var(--vs-bottom) + 320px);
    left: var(--vs-gutter);
    transform: none;
    width: calc(100vw - 2 * var(--vs-gutter) - var(--vs-cam) - 12px);
    align-items: flex-start;
    flex-direction: column-reverse;
  }
  .vs-toasts .vs-toast:not(:nth-last-child(-n + 2)) { display: none; }
  .vs-hud.is-visiting ~ .vs-toasts { top: auto; }
  .vs-toast { font-size: 14px; min-height: 44px; padding-right: 14px; }
  .vs-toast-ico { width: 34px; height: 34px; }
  .vs-toast-ico > .vs-ico { --s: 26px; }

  /* panels become bottom sheets */
  .vs-panel {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    max-height: 86vh;
    transform: none;
    border-radius: 26px 26px 0 0;
    border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    animation: vs-sheet-in .38s var(--vs-ease) both;
  }
  .vs-panel-head { border-radius: 22px 22px 0 0; padding: 10px 58px 10px 12px; gap: 8px; }
  .vs-panel-head > .vs-ico { --s: 44px; margin: -8px 0; }
  .vs-panel-title h2 { font-size: 22px; }
  .vs-panel-title p { font-size: 12.5px; }
  .vs-panel-head .vs-coins { display: none; }
  .vs-close { top: 8px; right: 8px; --vs-cam: 40px; }
  .vs-tabs { padding: 12px 12px 12px; }
  .vs-tab { min-height: 34px; padding: 0 12px; font-size: 14px; }
  .vs-panel-body { padding: 14px 12px 18px; }
  .vs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
  .vs-card { padding: 7px 7px 9px; border-radius: 18px; gap: 6px; }
  .vs-card-art { height: 84px; }
  .vs-card-art > .vs-ico { --s: 68px; }
  .vs-card h3 { font-size: 14px; }
  .vs-stats { grid-template-columns: 1fr; gap: 3px; }
  .vs-stats li { font-size: 12px; }
  .vs-card .vs-btn { min-height: 36px; font-size: 15px; padding: 0 10px; }
  .vs-card-tag { font-size: 11.5px; }
}

@media (max-width: 380px) {
  .vs-level { width: calc(100vw - 2 * var(--vs-gutter) - 150px); }
  .vs-tool-label { font-size: 12px; }
}
