/* Minecraft look: the inventory greys, bevelled buttons and slots, grass green for the main action. */
:root {
  --bg: #2b2b2b; --panel: #3a3a3a; --line: #151515; --text: #f2f2f2; --muted: #adadad;
  --accent: #5fa83a; --good: #55c23a; --bad: #d03b3b; --warn: #f0b232;
  --hi: #6a6a6a; --lo: #1e1e1e; --btn: #7a7a7a; --btn-hi: #b4b4b4; --btn-lo: #3d3d3d;
}
body[data-theme="light"] {
  --bg: #c6c6c6; --panel: #dcdcdc; --line: #2a2a2a; --text: #1b1b1b; --muted: #444;
  --hi: #ffffff; --lo: #555555; --btn: #8b8b8b; --btn-hi: #d0d0d0; --btn-lo: #555;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.4 ui-monospace, "Cascadia Mono", Consolas, Menlo, "Courier New", monospace; }
#app { max-width: 880px; margin: 0 auto; padding: 16px; }
header { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.title { display: flex; align-items: center; gap: 10px; min-width: 0; }
h1 { font-size: 20px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 8px; }
.count { color: var(--text); }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--muted); }
.pill.on { background: color-mix(in srgb, var(--good) 22%, transparent); color: var(--good); }
/* The in-game time of day next to the status: a little pixel sun (or moon) and the time. */
.title { flex-wrap: wrap; row-gap: 4px; }
.clock { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.clock::before { content: ""; width: 8px; height: 8px; flex: none; border: 2px solid #000; background: #f7d64a; }
.clock[data-phase="dusk"]::before, .clock[data-phase="dawn"]::before { background: #f08a3a; }
.clock[data-phase="night"]::before { background: #d6dff0; }
nav { display: flex; gap: 4px; }
nav button { background: transparent; color: var(--muted); border: 0; padding: 6px 12px; border-radius: 6px; cursor: pointer; font: inherit; }
nav button.active { background: var(--panel); color: var(--text); }
ul { list-style: none; margin: 0; padding: 0; }
.players { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.players li { display: flex; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.players li.empty { background: transparent; border: 0; }
.players li.clickable { cursor: pointer; }
.players li.clickable:hover { border-color: var(--accent); }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 6px; display: grid; place-items: center; font-weight: 700; color: #fff; }
.who { min-width: 0; }
.who .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .sub { color: var(--muted); font-size: 12px; }
.badge { font-size: 11px; padding: 0 6px; border-radius: 4px; background: var(--line); color: var(--muted); margin-inline-start: 6px; font-weight: 400; }
.events li { padding: 8px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; display: flex; gap: 10px; justify-content: space-between; }
.events li.empty { background: transparent; border: 0; }
.events .when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.notice { background: color-mix(in srgb, var(--warn) 18%, transparent); border: 1px solid var(--warn); border-radius: 8px; padding: 10px 12px; }
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 8px 2px; }
.steps { padding-inline-start: 20px; }
a.ext { color: var(--accent); }
.page-foot { margin-top: 24px; padding-top: 10px; border-top: 1px solid var(--line); }
button.primary { background: var(--accent); color: #fff; border: 0; padding: 8px 14px; border-radius: 6px; cursor: pointer; font: inherit; }
button.primary:disabled { opacity: .6; cursor: default; }
pre { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow: auto; user-select: all; }
code { background: var(--panel); padding: 1px 5px; border-radius: 4px; }
.map-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.map-bar .spacer { flex: 1; }
.map-bar select { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font: inherit; }
.check { display: flex; align-items: center; gap: 6px; color: var(--muted); }
button.icon { width: 30px; height: 30px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 6px; font-size: 18px; line-height: 1; cursor: pointer; }
#map-wrap { height: calc(100vh - 150px); min-height: 280px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #10131a; }
#map-canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#map-canvas:active { cursor: grabbing; }
body[data-theme="light"] #map-wrap { background: #dfe4ea; }
body { --map-bg: #10131a; }
body[data-theme="light"] { --map-bg: #dfe4ea; }
.admin-form { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px; max-width: 520px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field input, .field select { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; font: inherit; }
.small { font-size: 12px; }
button.primary.danger { background: var(--bad); }
.result { margin: 10px 0 0; padding: 8px 10px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); word-break: break-word; }
.result.ok { border-color: var(--good); }
.result.bad { border-color: var(--bad); }
[hidden] { display: none !important; }
.cams { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.cams li.empty { grid-column: 1 / -1; }
.cam { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.cam-pic { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 6px; cursor: zoom-in; object-fit: contain; }
.cam-head { margin-top: 4px; }
.cam-refresh { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
button.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 2px 0; font: inherit; align-self: flex-start; }
.link-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
#cam-big { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; cursor: zoom-out; z-index: 10; }
#cam-big canvas { max-width: 100%; max-height: calc(100vh - 80px); }
#cam-big p { color: #fff; margin: 0; }

/* ---- bevels: light top-left, dark bottom-right, like the game's own widgets ---- */
.players li, .events li, .admin-form, pre, #map-wrap, .cam, .result, .notice {
  border: 2px solid var(--line); border-radius: 0;
  box-shadow: inset 2px 2px 0 var(--hi), inset -2px -2px 0 var(--lo);
}
.players li, .events li, .cam { background: var(--panel); }
.players li.empty, .events li.empty { box-shadow: none; border: 0; }
.avatar, .pill, .badge, code, .field input, .field select, .map-bar select { border-radius: 0; }
.avatar { border: 2px solid #000; image-rendering: pixelated; }
.field input, .field select, .map-bar select {
  background: #000; color: #fff; border: 2px solid #a0a0a0; padding: 6px 8px;
  box-shadow: none;
}
body[data-theme="light"] .field input, body[data-theme="light"] .field select, body[data-theme="light"] .map-bar select { border-color: #555; }

nav button, button.icon, button.primary {
  border: 2px solid #000; border-radius: 0; cursor: pointer;
  background: var(--btn); color: #fff; text-shadow: 2px 2px 0 #3f3f3f;
  box-shadow: inset 2px 2px 0 var(--btn-hi), inset -2px -2px 0 var(--btn-lo);
  font-family: inherit; padding: 6px 12px;
}
nav button:hover, button.icon:hover, button.primary:hover { background: #8d8d8d; outline: 2px solid #fff; outline-offset: -4px; }
nav button:active, button.icon:active, button.primary:active { box-shadow: inset 2px 2px 0 var(--btn-lo), inset -2px -2px 0 var(--btn-hi); }
nav button.active { background: #5f5f5f; box-shadow: inset 2px 2px 0 #3d3d3d, inset -2px -2px 0 #8a8a8a; }
nav { gap: 6px; flex-wrap: wrap; }
button.primary { background: var(--accent); box-shadow: inset 2px 2px 0 #8fd163, inset -2px -2px 0 #3a6e22; }
button.primary:hover { background: #6fbb46; }
button.primary.danger { background: var(--bad); box-shadow: inset 2px 2px 0 #f07a7a, inset -2px -2px 0 #7e1f1f; }
button.primary:disabled { opacity: .55; }
button.icon { width: 32px; height: 32px; padding: 0; font-size: 18px; }
button.link { color: var(--accent); text-shadow: none; }
.pill { border: 2px solid #000; background: #555; color: #ddd; }
.pill.on { background: #2f6b1f; color: #c8f7b0; }
h1, h2 { letter-spacing: .04em; }
h2 { color: var(--muted); }
.players li.clickable:hover { outline: 2px solid #fff; outline-offset: -4px; }
#cam-big { background: rgba(0,0,0,.88); }
.cam-pic { border-radius: 0; border: 2px solid #000; }

/* trades */
.trades { display: flex; flex-direction: column; gap: 8px; }
.trade { background: var(--panel); border: 2px solid var(--line); box-shadow: inset 2px 2px 0 var(--hi), inset -2px -2px 0 var(--lo); padding: 10px 12px; }
.trade.empty { background: transparent; border: 0; box-shadow: none; }
.trade-row { display: flex; gap: 12px; align-items: flex-start; }
.trade-half { flex: 1; min-width: 0; }
.trade-who { font-weight: 700; margin-bottom: 4px; }
.trade-items li { padding: 1px 0; overflow-wrap: anywhere; }
.trade-arrow { font-size: 20px; align-self: center; color: var(--accent); }
@media (max-width: 480px) { .trade-row { flex-direction: column; } .trade-arrow { transform: rotate(90deg); } }

/* inventory slots in a trade */
.slots { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 4px; }
.slot { position: relative; width: 40px; height: 40px; background: #8b8b8b; border: 2px solid #373737; border-right-color: #fff; border-bottom-color: #fff; display: grid; place-items: center; }
body:not([data-theme="light"]) .slot { background: #555; border-color: #1c1c1c #6a6a6a #6a6a6a #1c1c1c; }
.slot-pic { width: 32px; height: 32px; image-rendering: pixelated; }
.slot-n { position: absolute; right: 1px; bottom: 0; color: #fff; font-weight: 700; font-size: 13px; line-height: 1; text-shadow: 2px 2px 0 #3f3f3f; }

/* player profile */
button.icon.wide { width: auto; padding: 0 12px; height: 32px; }
.profile-head { display: flex; gap: 14px; align-items: center; margin: 12px 0; }
.profile-name { font-size: 22px; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 12px 0; }
.stat { background: var(--panel); border: 2px solid var(--line); box-shadow: inset 2px 2px 0 var(--hi), inset -2px -2px 0 var(--lo); padding: 10px 12px; }
.stat-value { font-size: 22px; font-weight: 700; }
.stat-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.profile-tops { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.profile-top h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 6px; }
.top-list li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 8px; background: var(--panel); border: 2px solid var(--line); margin-bottom: 3px; }
.profile-heat { width: 100%; height: auto; border: 2px solid var(--line); display: block; margin-top: 8px; image-rendering: pixelated; }

/* mods */
.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.mod { background: var(--panel); border: 2px solid var(--line); box-shadow: inset 2px 2px 0 var(--hi), inset -2px -2px 0 var(--lo); padding: 8px 10px; min-width: 0; }
.mod-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mod-name { font-weight: 700; overflow-wrap: anywhere; }
.mod-desc { margin: 4px 0; overflow-wrap: anywhere; }
.mod a { color: var(--accent); overflow-wrap: anywhere; }
#mods-search { width: 100%; }

/* items */
.items-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.items-bar input[type=search] { flex: 1 1 200px; min-width: 0; }
.items-bar input, .items-bar select { background: var(--bg); color: var(--text); border: 2px solid var(--line); padding: 7px 9px; font: inherit; }
.items-grid { gap: 3px; }
.item-slot { padding: 0; cursor: pointer; font: inherit; }
.item-slot:hover, .item-slot:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* An item picture on its way: a pulsing block in the slot instead of the letter tile. */
.item-slot.loading .slot-pic { background: linear-gradient(90deg, rgba(255,255,255,.06) 25%, rgba(255,255,255,.22) 50%, rgba(255,255,255,.06) 75%); background-size: 300% 100%; animation: slot-loading 1.2s linear infinite; }
body[data-theme="light"] .item-slot.loading .slot-pic { background-image: linear-gradient(90deg, rgba(0,0,0,.06) 25%, rgba(0,0,0,.18) 50%, rgba(0,0,0,.06) 75%); }
@keyframes slot-loading { from { background-position: 100% 0; } to { background-position: -50% 0; } }
@media (prefers-reduced-motion: reduce) { .item-slot.loading .slot-pic { animation: none; background-position: 50% 0; } }
.items-card { width: 100%; max-width: 560px; height: auto; display: block; image-rendering: pixelated; border: 2px solid var(--line); }
.small { font-size: 12px; }
button.icon-text { background: var(--btn); color: #fff; border: 2px solid var(--line); padding: 6px 12px; cursor: pointer; font: inherit; text-shadow: 2px 2px 0 #3f3f3f; box-shadow: inset 2px 2px 0 var(--btn-hi), inset -2px -2px 0 var(--btn-lo); }
button.icon-text:disabled { opacity: .5; cursor: default; }

/* settings cog */
nav button.cog { margin-inline-start: auto; font-size: 18px; padding: 2px 10px; line-height: 1.2; }
.perm-group h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 12px 0 6px; }
.perms { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.perm, .setting { background: var(--panel); border: 2px solid var(--line); box-shadow: inset 2px 2px 0 var(--hi), inset -2px -2px 0 var(--lo); padding: 8px 10px; min-width: 0; }
.perm.held { border-color: var(--accent); }
.badge.ok { background: color-mix(in srgb, var(--good) 22%, transparent); color: var(--good); }
.notice.bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 18%, transparent); }

/* activity with heads, and moderation on a profile */
.events li.event { align-items: center; gap: 10px; justify-content: flex-start; }
.events li.event .event-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.events li.clickable { cursor: pointer; }
.events li.clickable:hover, .events li.clickable:focus-visible { border-color: var(--accent); outline: none; }
.profile-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.profile-actions input { background: var(--bg); color: var(--text); border: 2px solid var(--line); padding: 6px 9px; font: inherit; min-width: 180px; }
button.icon-text.danger { background: var(--bad); }

/* ---- demo mode (demo.js): shown when the page is opened outside GameVox ---- */
.demo-banner { position: sticky; top: 0; z-index: 5; /* under #cam-big (10), so a full-size picture covers it */ background: #3b2a08; color: #fff3d6; border-bottom: 2px solid var(--warn); padding: 8px 16px; }
.demo-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; max-width: 880px; margin: 0 auto; }
.demo-badge { background: var(--warn); color: #1b1b1b; font-weight: 700; letter-spacing: .08em; padding: 2px 10px; }
.demo-line { flex: 1 1 260px; min-width: 0; }
.demo-more { background: transparent; color: #fff3d6; border: 1px solid #fff3d6; padding: 4px 10px; font: inherit; cursor: pointer; }
.demo-more:hover { background: rgba(255, 243, 214, .15); }
.demo-how { max-width: 880px; margin: 8px auto 2px; max-height: 40vh; overflow-y: auto; }
.demo-how[hidden] { display: none; }
.demo-how p { margin: 6px 0; }
.demo-how ol { margin: 6px 0; padding-inline-start: 22px; }
.demo-banner a { color: #ffd24a; }
.demo-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #151515; color: #fff; border: 2px solid var(--warn); padding: 8px 14px; z-index: 80; opacity: 0; pointer-events: none; transition: opacity .15s; max-width: calc(100vw - 32px); }
.demo-toast.show { opacity: 1; }
body.demo-mode #map-wrap { height: calc(100vh - 230px); }

/* ---- player row menu (playermenu.js): right click, long press, the "..." button ---- */
.players li .who { flex: 1; }
button.row-more { flex: none; margin-inline-start: auto; min-width: 32px; height: 28px; padding: 0 6px; font: inherit; font-weight: 700; letter-spacing: .08em; line-height: 1;
  background: var(--btn); color: #fff; text-shadow: 2px 2px 0 #3f3f3f; border: 2px solid #000; border-radius: 0; cursor: pointer;
  box-shadow: inset 2px 2px 0 var(--btn-hi), inset -2px -2px 0 var(--btn-lo); }
button.row-more:hover, button.row-more:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.players li.clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.ctx-menu { position: fixed; z-index: 60; min-width: 190px; max-width: calc(100vw - 16px); background: var(--panel); border: 2px solid #000; padding: 4px;
  box-shadow: inset 2px 2px 0 var(--hi), inset -2px -2px 0 var(--lo), 4px 4px 0 rgba(0,0,0,.45); }
.ctx-title { padding: 4px 8px 6px; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-bottom: 2px solid var(--line); margin-bottom: 4px; }
.ctx-item { display: block; width: 100%; text-align: start; background: transparent; color: var(--text); border: 0; padding: 8px 10px; font: inherit; cursor: pointer; }
.ctx-item:hover, .ctx-item:focus { background: var(--btn); color: #fff; outline: none; text-shadow: 2px 2px 0 #3f3f3f; }
.ctx-item.danger { color: #ff8a8a; }
body[data-theme="light"] .ctx-item.danger { color: #a01818; }
.ctx-item.danger:hover, .ctx-item.danger:focus { background: var(--bad); color: #fff; }
.ctx-sep { height: 2px; background: var(--line); margin: 4px 0; }

/* in-page confirm dialog (admin.js) */
.dialog-shade { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.dialog { width: 100%; max-width: 420px; background: var(--panel); border: 2px solid #000; padding: 14px 16px; box-shadow: inset 2px 2px 0 var(--hi), inset -2px -2px 0 var(--lo); }
.dialog-title { margin: 0 0 6px; font-size: 16px; overflow-wrap: anywhere; }
.dialog p { overflow-wrap: anywhere; }
.dialog-buttons { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 12px; }

/* "Showing only X" above the Cameras and Trades lists */
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin: 0 0 10px; padding: 8px 10px;
  background: var(--panel); border: 2px solid var(--accent); box-shadow: inset 2px 2px 0 var(--hi), inset -2px -2px 0 var(--lo); }
.filter-bar span { overflow-wrap: anywhere; min-width: 0; }

/* Activity filter: three buttons that work as one choice */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 0 0 10px; }
.seg button { border: 2px solid #000; border-radius: 0; cursor: pointer; background: var(--btn); color: #fff; text-shadow: 2px 2px 0 #3f3f3f; font: inherit; padding: 6px 12px;
  box-shadow: inset 2px 2px 0 var(--btn-hi), inset -2px -2px 0 var(--btn-lo); }
.seg button:hover { outline: 2px solid #fff; outline-offset: -4px; }
.seg button.active { background: var(--accent); box-shadow: inset 2px 2px 0 #8fd163, inset -2px -2px 0 #3a6e22; }
.seg button:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.events li.event-adv { border-color: #b8860b; }
.badge.adv { background: #5a4500; color: #ffd84a; margin-inline-start: 0; flex: none; }
body[data-theme="light"] .badge.adv { background: #ffe9a3; color: #5a4500; }

/* Settings cog: permission name on one line, chips on the line below, in every card */
.perm-name { display: block; }
.perm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.perm-chips .badge { margin-inline-start: 0; }

/* ---- setup wizard (wizard.js) ---- */
body.setup-mode #tabs, body.setup-mode main > section:not(#view-wizard), body.setup-mode #notice { display: none !important; }
.wiz-title { font-size: 16px; color: var(--text); text-transform: none; letter-spacing: .02em; margin: 6px 0 4px; }
.wiz-progress { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 4px; }
.wiz-pill { font: inherit; font-size: 12px; padding: 4px 8px; border: 2px solid #000; background: #4a4a4a; color: #cfcfcf; cursor: pointer; border-radius: 0; }
.wiz-progress li.done .wiz-pill { background: #2f6b1f; color: #c8f7b0; }
.wiz-progress li.now .wiz-pill { background: var(--accent); color: #fff; text-shadow: 2px 2px 0 #3a6e22; }
.wiz-pill:disabled { cursor: default; opacity: .7; }
body[data-theme="light"] .wiz-pill { background: #9a9a9a; color: #fff; }
.wiz-step { background: var(--panel); border: 2px solid var(--line); box-shadow: inset 2px 2px 0 var(--hi), inset -2px -2px 0 var(--lo); padding: 12px 14px; max-width: 680px; }
.wiz-h { margin: 0 0 10px; font-size: 14px; outline: none; }
.wiz-step code { overflow-wrap: anywhere; }
.wiz-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin-bottom: 8px; }
.wiz-type { display: flex; flex-direction: column; gap: 4px; text-align: start; font: inherit; color: var(--text); background: var(--bg); padding: 10px; cursor: pointer;
  border: 2px solid #000; border-radius: 0; box-shadow: inset 2px 2px 0 var(--hi), inset -2px -2px 0 var(--lo); }
.wiz-type:hover, .wiz-type:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.wiz-type.chosen { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, var(--bg)); }
.wiz-type.chosen .wiz-type-name::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-inline-end: 6px; background: var(--accent); border: 2px solid #000; vertical-align: 1px; }
.wiz-type-name { font-weight: 700; }
.wiz-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.wiz-nav button.icon-text, .wiz-nav button.primary { font: inherit; }
.wiz-lines, .wiz-token { white-space: pre-wrap; word-break: break-all; }
.wiz-wait { display: flex; gap: 10px; align-items: flex-start; }
.wiz-spinner { flex: none; width: 16px; height: 16px; margin-top: 2px; background: var(--accent); border: 2px solid #000; animation: wiz-blink 1s steps(2, start) infinite; }
@keyframes wiz-blink { to { background: #2f6b1f; } }
@media (prefers-reduced-motion: reduce) { .wiz-spinner { animation: none; } }
.wiz-list { list-style: square; padding-inline-start: 20px; }
.wiz-list li { margin: 4px 0; }
.wiz-optional { margin-top: 14px; padding-top: 10px; border-top: 2px solid var(--line); }
.wiz-foot { margin-top: 10px; }
.wiz-member { max-width: 560px; }
.notice.ok { border-color: var(--good); background: color-mix(in srgb, var(--good) 16%, transparent); margin-bottom: 12px; }
.wiz-done button { margin-inline-start: 6px; }
@media (max-width: 480px) {
  .wiz-step { padding: 10px; }
  .wiz-nav { justify-content: stretch; }
  .wiz-nav button { flex: 1 1 auto; }
  .ctx-item { padding: 10px; }
}
.perm-where { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; }
.perm-where p { flex: 1 1 320px; margin: 6px 0; }
.perm-where button { flex: none; }

/* ---- the server address next to the status (app.js) ---- */
.addr { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.addr code { font-size: 12px; padding: 2px 6px; border: 2px solid #000; background: #000; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; user-select: all; }
body[data-theme="light"] .addr code { background: #fff; color: #1b1b1b; border-color: #555; }
button.addr-copy { flex: none; font: inherit; font-size: 12px; padding: 2px 8px; cursor: pointer; color: #fff; background: var(--btn); border: 2px solid #000; border-radius: 0;
  text-shadow: 1px 1px 0 #3f3f3f; box-shadow: inset 2px 2px 0 var(--btn-hi), inset -2px -2px 0 var(--btn-lo); }
button.addr-copy:hover, button.addr-copy:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
input.copy-box { width: 100%; font: inherit; background: #000; color: #fff; border: 2px solid #a0a0a0; padding: 6px 8px; }
@media (max-width: 480px) { .addr code { max-width: calc(100vw - 120px); } }

/* ---- linked GameVox members and the GameVox Cam mod (links.js) ---- */
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; margin-top: 3px; font-size: 12px; min-width: 0; }
.tags .badge { margin-inline-start: 0; }
.member { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; color: var(--text); }
.member-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.member-av { flex: none; display: inline-grid; place-items: center; overflow: hidden; border-radius: 50%; color: #fff; font-weight: 700; line-height: 1; }
.member-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge.warn { background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--warn); }
body[data-theme="light"] .badge.warn { background: #ffe9a3; color: #6b4a00; }
.badge.modchip { background: #1f3f5c; color: #a9d6ff; white-space: nowrap; }
body[data-theme="light"] .badge.modchip { background: #cfe6fb; color: #123a5c; }
.badge.modchip .q { opacity: .75; }
.profile-links { margin: 4px 0 10px; }
.profile-links .link-card { display: flex; gap: 10px; align-items: center; background: var(--panel); border: 2px solid var(--line); padding: 8px 10px;
  box-shadow: inset 2px 2px 0 var(--hi), inset -2px -2px 0 var(--lo); }
.profile-links .link-card .who { flex: 1; }
.profile-links .link-card .name { font-weight: 700; overflow-wrap: anywhere; }
.profile-links p { margin: 6px 0; }
.profile-links .mod-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.profile-links .mod-line .badge { margin-inline-start: 0; }
@media (max-width: 480px) { .profile-links .link-card { flex-wrap: wrap; } }

/* ---- the server address in settings (settings.js) ---- */
.addr-now { margin: 6px 0 10px; }
.addr-now code, .addr-status code, .addr-extra code { overflow-wrap: anywhere; }
.addr-choices { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.addr-choice { background: var(--panel); border: 2px solid var(--line); box-shadow: inset 2px 2px 0 var(--hi), inset -2px -2px 0 var(--lo); padding: 8px 10px; }
.addr-choice .check { color: var(--text); font-weight: 700; }
.addr-extra { margin: 4px 0 0; margin-inline-start: 24px; }
.addr-extra input[type=text] { width: 100%; max-width: 420px; background: #000; color: #fff; border: 2px solid #a0a0a0; padding: 6px 8px; font: inherit; }
.addr-extra input[type=text]:disabled { opacity: .5; }
body[data-theme="light"] .addr-extra input[type=text] { border-color: #555; }
.addr-extra .muted.small { margin-top: 4px; }
.addr-status { margin: 10px 0 0; max-width: 640px; }
.addr-status .notice p, .addr-status > .muted p { margin: 4px 0; }
#addr-body .result { max-width: 640px; }
#addr-body .result p { margin: 4px 0; }
#addr-body .result.pending { border-color: var(--warn); }
#addr-body .result button { margin-top: 6px; }
@media (max-width: 480px) { .addr-extra { margin-inline-start: 0; } }
