/* Vibe Tribe world UI: one liquid-glass material for every panel.
   Glass = a light tint over a frosted, saturated copy of the world, a bright rim that catches
   light on the top-left and bottom-right edges, and a soft specular sheen near the top.
   In Chromium the bar, dock and prompt also refract the world through an SVG displacement
   filter (body.lg-refract, set from world.html). Everything else falls back to blur only.
   Selectors are prefixed with `body` so they win over styles that modules inject at runtime. */

:root {
  --g-tint: rgba(20, 30, 42, .30);
  --g-tint-strong: rgba(13, 19, 27, .66);
  --g-blur: blur(18px) saturate(1.8) brightness(1.06);
  --g-blur-strong: blur(26px) saturate(1.5);
  --g-rim: linear-gradient(140deg, rgba(255,255,255,.75), rgba(255,255,255,.14) 30%, rgba(255,255,255,.04) 62%, rgba(255,255,255,.42));
  --g-sheen: linear-gradient(180deg, rgba(255,255,255,.20), rgba(255,255,255,0) 46%);
  --g-shadow: 0 10px 30px rgba(6, 12, 20, .26), 0 1px 2px rgba(6, 12, 20, .2);
  --g-text: #fff;
  --g-muted: rgba(255,255,255,.74);
  --g-fill: rgba(255,255,255,.14);
  --g-fill-hover: rgba(255,255,255,.22);
  --teal: #72C6BD;
  --teal-deep: #2f9c95;
  --gold: #F2C06B;
  --r-panel: 18px;
  --r-btn: 12px;
}

/* ---------------------------------------------------------------- the material */
body .brand, body .toolbar, body .wdock, body #prompt, body #toast, body #help, body #ticker > div,
body #game .card, body #search, body #avatarPanel, body #profile, body #minimap, body #stick, body #tbtns button {
  background: var(--g-tint);
  -webkit-backdrop-filter: var(--g-blur);
  backdrop-filter: var(--g-blur);
  border: 0;
  border-radius: var(--r-panel);
  box-shadow: var(--g-shadow);
  color: var(--g-text);
  isolation: isolate;
}
/* panels that are not already position:fixed need a box for their ::before/::after */
body .brand, body .toolbar, body #ticker > div, body #game .card, body #tbtns button { position: relative; }
/* rim light: a 1px gradient border drawn with a mask, so it follows any radius */
body .brand::after, body .toolbar::after, body .wdock::after, body #prompt::after, body #toast::after, body #help::after,
body #ticker > div::after, body #game .card::after, body #search::after, body #avatarPanel::after, body #profile::after,
body #stick::after, body #tbtns button::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--g-rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
/* specular sheen across the top */
body .brand::before, body .toolbar::before, body .wdock::before, body #prompt::before, body #toast::before,
body #game .card::before, body #ticker > div::before, body #help::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: var(--g-sheen);
}
/* water refraction where the browser can do it */
body.lg-refract .brand, body.lg-refract .toolbar, body.lg-refract .wdock, body.lg-refract #prompt {
  -webkit-backdrop-filter: url(#lg-refract) blur(7px) saturate(1.9) brightness(1.06);
  backdrop-filter: url(#lg-refract) blur(7px) saturate(1.9) brightness(1.06);
}
/* reading surfaces: same glass, more tint */
body #profile, body #search, body #avatarPanel {
  background: var(--g-tint-strong);
  -webkit-backdrop-filter: var(--g-blur-strong);
  backdrop-filter: var(--g-blur-strong);
}

/* ---------------------------------------------------------------- type, keys, buttons */
body { font: 14px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body .brand, body .toolbar, body .wdock, body #prompt, body #toast, body #help, body #ticker, body #game { text-shadow: 0 1px 2px rgba(0,0,0,.28); }
body kbd {
  font: 600 10.5px/1 ui-monospace, "SF Mono", Consolas, monospace; color: #fff;
  background: rgba(255,255,255,.16); border: 0; border-radius: 5px; padding: 3px 5px 2px;
  box-shadow: inset 0 -1.5px 0 rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.25);
  text-shadow: none;
}
body button { font: inherit; color: var(--g-text); background: var(--g-fill); border: 0; border-radius: var(--r-btn); padding: 8px 12px; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22); transition: background .15s, transform .15s; }
body button:hover { background: var(--g-fill-hover); border-color: transparent; }
body button:active { transform: scale(.97); }
body button[aria-pressed="true"] { background: rgba(114,198,189,.42); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 0 0 1px rgba(114,198,189,.7); }
body button:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------------------------------------------------------------- top bar: brand + tools */
body .hud { top: 14px; left: 14px; right: 14px; gap: 10px; align-items: flex-start; }
body .brand { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border-radius: 16px; pointer-events: auto; }
body .brand .emb { width: 30px; height: 30px; }
body .brand b { display: block; font: 21px/1.05 'Patrick Hand', system-ui; letter-spacing: .4px; }
body .brand span { display: block; color: var(--g-muted); font-size: 12px; }
body .toolbar { margin-left: auto; display: flex; gap: 2px; padding: 5px; border-radius: 16px; pointer-events: auto; }
body .toolbar button { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; background: transparent; box-shadow: none; position: relative; }
body .toolbar button:hover { background: var(--g-fill); }
body .toolbar .sep { width: 1px; margin: 7px 3px; background: rgba(255,255,255,.22); }
body .toolbar #bAdmin { width: auto; padding: 0 10px; display: flex; gap: 6px; font-weight: 600; font-size: 13px; }
body .toolbar .badge { min-width: 18px; height: 18px; border-radius: 9px; background: var(--gold); color: #1a1408; font-size: 11px; line-height: 18px; text-shadow: none; padding: 0 5px; }
body .toolbar .badge:empty { display: none; }
body #bSound .off { display: none; }
body #bSound[aria-pressed="false"] .on { display: none; }
body #bSound[aria-pressed="false"] .off { display: block; }
body #bSound[aria-pressed="true"], body #bSound[aria-pressed="false"] { background: transparent; box-shadow: none; }
/* tooltips: label + key */
body .toolbar button[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; top: calc(100% + 8px); right: 0; white-space: nowrap; pointer-events: none;
  font: 500 12px/1 system-ui; padding: 7px 9px; border-radius: 9px; background: rgba(13,19,27,.82); color: #fff; box-shadow: var(--g-shadow);
}

/* ---------------------------------------------------------------- dock: the four things you do most */
body .wdock { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 4px; padding: 6px; border-radius: 22px; z-index: 4; }
body .wdock button { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; align-items: center; column-gap: 8px;
  padding: 8px 14px 8px 12px; border-radius: 16px; background: transparent; box-shadow: none; text-align: left; }
body .wdock button:hover { background: var(--g-fill); }
body .wdock button .ico { grid-row: 1 / 3; width: 22px; height: 22px; }
body .wdock button span { font-weight: 600; font-size: 13.5px; line-height: 1.1; }
body .wdock button kbd { justify-self: start; margin-top: 3px; font-size: 9.5px; padding: 2px 4px 1px; background: rgba(255,255,255,.12); }
body .wdock button.primary { background: rgba(114,198,189,.5); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 0 0 1px rgba(114,198,189,.8); }
body .wdock button.primary:hover { background: rgba(114,198,189,.62); }

/* ---------------------------------------------------------------- prompts and notices */
body #prompt { bottom: 96px; padding: 9px 16px 9px 9px; border-radius: 16px; font: 500 15px/1.2 system-ui; display: none; align-items: center; gap: 10px; }
body #prompt[style*="block"] { display: flex !important; }
body #prompt kbd { font-size: 13px; min-width: 26px; height: 26px; display: inline-grid; place-items: center; padding: 0; background: var(--teal); color: #10251f; border-radius: 8px; text-shadow: none;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.5); }
body #toast { top: 76px; padding: 10px 16px; border-radius: 16px; font-size: 14px; }
body #help { left: 14px; bottom: 14px; max-width: 430px; padding: 8px 12px; border-radius: 14px; color: var(--g-muted); font-size: 12px; line-height: 1.95; }
body #help kbd { margin-right: 2px; }
body #ticker { bottom: 104px; gap: 6px; width: min(320px, calc(100vw - 28px)); }
body #ticker > div { border-radius: 13px; padding: 7px 11px; font-size: 12.5px; color: #fff; }
body #ticker > div b { color: var(--gold); }

/* ---------------------------------------------------------------- game panel */
body #game { top: 76px; gap: 8px; font-family: system-ui, sans-serif; }
body #game .card { border-radius: 16px; padding: 10px 12px; color: #fff; }
body #game .lv { font-size: 13px; font-weight: 600; gap: 9px; }
body #game .lv b { background: var(--gold); color: #1a1408; border-radius: 8px; padding: 2px 8px; font-size: 13px; text-shadow: none; }
body #game .bar { height: 6px; margin-top: 8px; border-radius: 3px; background: rgba(255,255,255,.18); box-shadow: inset 0 1px 1px rgba(0,0,0,.2); }
body #game .bar i { background: var(--teal); border-radius: 3px; box-shadow: inset 0 1px 0 rgba(255,255,255,.55); }
body #game .vb { color: var(--gold); display: flex; align-items: center; gap: 5px; }
body #game .vb .gem { width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); border-radius: 2px; box-shadow: inset 1px 1px 0 rgba(255,255,255,.6); }
body #game .q { font-size: 13px; gap: 6px; }
body #game .q span { color: var(--g-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
body #game .q .ok { color: var(--teal); }

/* ---------------------------------------------------------------- minimap */
body #minimap { border-radius: 50%; border: 0; background: rgba(20,30,42,.18);
  box-shadow: var(--g-shadow), inset 0 0 0 1px rgba(255,255,255,.55), inset 0 2px 6px rgba(255,255,255,.25); }

/* ---------------------------------------------------------------- floating labels over rooms (no blur: there are many) */
body .tag { background: rgba(13,19,27,.58); border: 1px solid rgba(255,255,255,.22); border-radius: 9px; padding: 3px 9px; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
body .tag.room { border-color: rgba(255,255,255,.32); }

/* ---------------------------------------------------------------- reading panels */
body #profile { left: 16px; right: 16px; bottom: 16px; border-radius: 22px; }
body #profile .top { border-bottom: 1px solid rgba(255,255,255,.12); color: var(--g-muted); padding: 12px 16px; }
body #profile .top a { color: var(--gold); }
body #profile #closeProfile { width: 32px; height: 32px; padding: 0; border-radius: 50%; font-size: 18px; line-height: 1; }
body #profile .hero { border-left: 0; padding: 22px 24px 6px; position: relative; }
body #profile .hero::before { content: ''; position: absolute; left: 24px; top: 14px; width: 42px; height: 4px; border-radius: 2px; background: var(--c, var(--gold)); }
body #profile .who, body #profile .facts div span, body #profile .net, body #profile .more h4, body #results small, body #profile .more li small { color: var(--g-muted); }
body #profile .about { color: rgba(255,255,255,.86); }
body #profile .cta { border-radius: 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
body #profile .more li { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; }
body #profile .row input, body #profile textarea.embed, body #search input {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; color: #fff; }
body #search { top: 76px; border-radius: 20px; padding: 10px; }
body #search input { padding: 11px 13px; font-size: 15px; }
body #results button { border-radius: 12px; background: transparent; box-shadow: none; }
body #results button:hover { background: var(--g-fill); }
body #avatarPanel { top: 76px; border-radius: 20px; padding: 14px 16px; }
body #apBodies button { border-radius: 10px; }

/* ---------------------------------------------------------------- touch */
body #stick { background: rgba(20,30,42,.22); border: 0; }
body #stick i { background: rgba(255,255,255,.88); box-shadow: 0 4px 12px rgba(0,0,0,.25), inset 0 -2px 0 rgba(0,0,0,.12); }
body #tbtns button { border-radius: 50%; font-weight: 600; }

/* ---------------------------------------------------------------- small screens and touch */
@media (max-width: 1100px) { body #help { display: none; } body #ticker { bottom: 90px; } }
@media (max-width: 760px) {
  body .wdock button span, body .wdock button kbd { display: none; }
  body .wdock button { padding: 10px 12px; }
  body .toolbar .wide { display: none; }
  body .brand span { display: none; }
}
body.touch .wdock { left: auto; right: 14px; top: 76px; bottom: auto; transform: none; flex-direction: column; }
body.touch .wdock button span, body.touch .wdock button kbd { display: none; }
body.touch .wdock button { padding: 10px; }
body.touch #minimap { display: none; }
body.touch #prompt { bottom: 170px; }

/* ---------------------------------------------------------------- profile tabs and project extras */
body #profile .ptabs { display: flex; gap: 4px; padding: 0 0 10px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 4px; overflow-x: auto; }
body #profile .ptabs button { background: transparent; box-shadow: none; border-radius: 10px; padding: 7px 13px; color: var(--g-muted); font-weight: 600; }
body #profile .ptabs button[aria-selected="true"] { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 0 -2px 0 var(--gold); }
body #profile .ppane { display: grid; gap: 14px; }
body #profile .ppane[hidden] { display: none; }
body #profile .pj-badge { display: inline-block; padding: 5px 10px; border-radius: 9px; background: rgba(114,198,189,.22); color: #c9f1ec; font-weight: 600; font-size: 13px; }
body #profile ul.pj-time li { border-left: 3px solid var(--gold); border-radius: 4px 12px 12px 4px; }
body #profile iframe.pj-demo { display: block; width: 100%; height: 420px; margin-top: 10px; border: 0; border-radius: 14px; background: #10151D; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
body #collection, body #pollPanel { position: fixed; right: 16px; top: 76px; width: min(360px, calc(100vw - 32px)); max-height: calc(100% - 100px); overflow: auto; display: none; z-index: 7; padding: 14px 16px; border-radius: 20px;
  background: var(--g-tint-strong); -webkit-backdrop-filter: var(--g-blur-strong); backdrop-filter: var(--g-blur-strong); box-shadow: var(--g-shadow); color: #fff; }
body #pollPanel button, body #collection button[data-colgo] { width: 100%; }

body .toolbar #bJudge { width: auto; padding: 0 11px; display: flex; gap: 6px; font-weight: 700; font-size: 13px; color: #1a1408; background: var(--gold); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 0 0 1px rgba(242,192,107,.6); text-shadow: none; }
body .toolbar #bJudge:hover { background: #f6cd85; }

/* ---------------------------------------------------------------- main menu (on the title screen, and in game for the account) */
body #menu { display: grid; gap: 10px; justify-items: center; width: min(420px, 90vw); margin: 6px auto 0; }
body #menu .go { width: 100%; }
body #menuMore { width: 100%; display: grid; gap: 8px; }
body #menu .mrow { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
body #menu .mrow button { flex: 1; min-width: 120px; padding: 11px 14px; border-radius: 12px; font-weight: 600; }
body #menu .mrow.mlinks button { background: transparent; box-shadow: none; color: rgba(255,255,255,.78); font-weight: 500; padding: 6px; }
body #menu .mpri { background: var(--teal); color: #10251f; text-shadow: none; }
body #menu .mwho { margin: 0; color: #fff; font-size: 15px; } body #menu .mwho small { color: rgba(255,255,255,.6); }
body #menu .mnote { margin: 0; color: rgba(255,255,255,.75); font-size: 13px; }
body #menu .mform { display: grid; gap: 9px; text-align: left; padding: 16px; border-radius: 18px; background: rgba(13,19,27,.6); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
body #menu .mform > b { font: 22px 'Patrick Hand', system-ui; } body #menu .mform small { color: rgba(255,255,255,.7); font-size: 12.5px; } body #menu .mform a { color: var(--gold); cursor: pointer; }
body #menu .mform label { display: grid; gap: 4px; font-size: 13px; color: rgba(255,255,255,.8); }
body #menu .mform input { font: inherit; font-size: 15px; color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 10px 12px; user-select: text; }
body #menu .mform input:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
body #menu .merr { margin: 0; min-height: 18px; color: #ff9a8a; font-size: 13px; }
body #menu .mhow { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; color: rgba(255,255,255,.88); line-height: 1.6; }
body #start.ingame { background: rgba(10,14,20,.55); }
body #start.ingame .emblem, body #start.ingame h1, body #start.ingame .tag2, body #start.ingame .bar, body #start.ingame > .wrap > p, body #start.ingame .foot { display: none; }
