/* Ownership (verified badge, bio and socials, claim flow, owner editor) and the leaderboard. Uses style.css tokens. */

.own { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); text-align: left; }
.own-note { margin: 0 0 10px; font-size: var(--fs-3); color: var(--neg); }
.own-note.ok { color: #8be3b5; }
.own-note.warn { color: var(--warn); }

.vbadge {
  display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; padding: 2px 8px 2px 6px; border-radius: 99px;
  font: 600 var(--fs-1)/1.4 var(--body); letter-spacing: 0.02em; color: #8be3b5;
  background: rgba(139, 227, 181, 0.12); border: 1px solid rgba(139, 227, 181, 0.35);
}
.vbadge svg { width: 12px; height: 12px; }
.bio { margin: 0 0 10px; font-size: var(--fs-4); line-height: 1.5; overflow-wrap: anywhere; }
.socials { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.socials a { font-size: var(--fs-2); padding: 4px 10px; border-radius: 99px; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.socials a:hover { border-color: var(--line-2); text-decoration: none; }

button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); box-shadow: none; font-weight: 600; padding: 0 14px; min-height: var(--h-ctl); }
button.ghost:hover { border-color: var(--accent); }
button.link { background: none; box-shadow: none; padding: 4px; color: var(--accent); font-weight: 500; }
button.link.danger { color: var(--muted); }
.own > button.link { font-size: var(--fs-3); padding: 4px 0; }
.profile .own > button.link { display: block; margin: 0 auto; }
button.link.danger:hover { color: var(--neg); }
button.ghost::after, button.link::after { display: none; }

.claim { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.claim .code { font: 700 30px/1.1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.18em; margin: 4px 0 8px; }
.claim p { margin: 6px 0 0; font-size: var(--fs-3); }
.claim code { font: 13px ui-monospace, "Cascadia Mono", Consolas, monospace; background: rgba(5, 8, 20, 0.6); padding: 1px 6px; border-radius: 5px; }
.claim .switch { font-size: var(--fs-4); line-height: 1.5; }
.claim button.ghost:disabled { opacity: 0.5; cursor: default; }

.own-edit { display: grid; gap: 10px; }
.own-edit label { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-2); color: var(--muted); }
.vsince { margin: 0 0 10px; font-size: var(--fs-2); color: var(--muted); }
.spark { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: var(--fs-2); color: var(--accent); }
.spark .up { color: #8be3b5; }
.spark .down { color: var(--neg); }
.own-acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
button.link.quiet { color: var(--muted); font-size: var(--fs-2); }
button.link.quiet:hover { color: var(--text); }
.own-edit select { align-self: flex-start; }
.own-edit textarea { padding: 10px 12px; }
.own-edit textarea, .own-edit input[type="text"], .own-edit select {
  resize: vertical;
}
/* Fields fill their column instead of keeping the browser's default width, which overflowed narrow cards. */
.own-edit textarea, .own-edit input[type="text"] { width: 100%; min-width: 0; }
.own-edit label { min-width: 0; }
.own-edit .soc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.own-edit label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: var(--fs-3); }
.own-edit input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }
.own-edit .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.own-err { color: var(--neg); margin: 0; font-size: var(--fs-3); }

/* ---------- leaderboard ---------- */

.board { max-width: 760px; margin: 0 auto; }

.seg { display: flex; justify-content: center; gap: 4px; margin: 0 0 16px; }
.seg a { color: var(--muted); padding: 6px 14px; border-radius: 8px; font-size: var(--fs-3); letter-spacing: 0.08em; text-transform: uppercase; }
.seg a:hover { color: var(--text); background: var(--panel-2); text-decoration: none; }
.seg a.on { color: var(--text); background: var(--panel-2); box-shadow: inset 0 -2px 0 var(--accent); }
.board-list { list-style: none; margin: 0; padding: 0; }
.board-list li { display: grid; grid-template-columns: 28px 32px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--line); }
.board-list li:first-child { border-top: 0; }
.board-list .pos { font: 700 var(--fs-4)/1 var(--display); color: var(--muted); text-align: center; }
.board-list li:nth-child(-n + 3) .pos { color: var(--gold); }
.board-list img { width: 32px; height: 32px; border-radius: 6px; image-rendering: pixelated; }
.board-list li[data-p="discord"] img { border-radius: 50%; image-rendering: auto; }
.board-list .who { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-list .who .muted { font-weight: 400; font-size: var(--fs-3); }
.board-list .num { font-weight: 600; }
.board-list .empty { display: block; text-align: center; padding: 28px 0; }
.board-list li:has(.sk) { display: block; }

@media (max-width: 520px) {
  .board-list li { grid-template-columns: 22px 28px minmax(0, 1fr) auto; gap: 10px; }
  .board-list .rank { display: none; }
  .own-edit .soc-grid { grid-template-columns: 1fr; }
}

/* ---------- hangout ---------- */

/* The hangout fills the window under the header like a game: no page padding, no footer. */
body.game main { max-width: none; padding: 0; }
body.game footer { display: none; }
.hg-stage { position: relative; width: 100%; overflow: hidden; background: #070b1a; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
#hg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: pointer; touch-action: none; }
#hg:focus { outline: none; }
.hg-stage button { font-size: var(--fs-3); }
.hg-top { position: absolute; top: 10px; left: 12px; display: flex; gap: 10px; align-items: center; padding: 5px 10px; border-radius: 8px; background: rgba(5, 8, 20, 0.82); font-size: var(--fs-3); color: var(--muted); }
.hg-top button.link { font-size: var(--fs-3); padding: 0; }
.hg-map { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; align-items: flex-start; }
#hg-mini { width: 180px; height: 120px; image-rendering: pixelated; border: 1px solid var(--line-2); border-radius: 6px; background: #070b1a; }
.hg-zoom { display: grid; gap: 4px; }
.hg-zoom button { width: 30px; height: 30px; padding: 0; font-size: 18px; line-height: 1; border-radius: 6px; background: rgba(5, 8, 20, 0.7); color: var(--text); border: 1px solid var(--line-2); box-shadow: none; }
.hg-zoom button::after { display: none; }
.hg-chatbox { position: absolute; left: 10px; bottom: 10px; width: min(420px, calc(100% - 20px)); display: grid; gap: 6px; }
.hg-log { list-style: none; margin: 0; padding: 6px 10px; max-height: 26vh; overflow-y: auto; font-size: var(--fs-3); line-height: 1.45; background: rgba(5, 8, 20, 0.62); border-radius: 8px; overflow-wrap: anywhere; }
.hg-log:empty { display: none; }
.hg-log li.note { color: var(--muted); font-style: italic; }
.hg-name { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; cursor: pointer; box-shadow: none; }
.hg-name::after { display: none; }
.hg-say { display: flex; gap: 6px; }
.hg-say input { flex: 1; min-width: 0; }
.hg-say button { min-height: var(--h-ctl); padding: 0 14px; }
.hg-bar { position: absolute; bottom: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; max-width: calc(100% - 450px); }
.hg-emotes { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.hg-emotes button, .hg-colorbtn, .hg-emotebtn { padding: 6px 10px; border-radius: 8px; background: rgba(5, 8, 20, 0.7); color: var(--text); border: 1px solid var(--line-2); box-shadow: none; font-weight: 500; }
.hg-emotes button::after, .hg-colorbtn::after, .hg-emotebtn::after { display: none; }
.hg-emotebtn { display: none; }
.hg-colors { position: absolute; bottom: calc(100% + 8px); right: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; width: max-content; max-width: 360px; padding: 8px 10px; border-radius: 10px; background: rgba(5, 8, 20, 0.85); border: 1px solid var(--line-2); }
.swatch { width: 26px; height: 26px; padding: 0; border-radius: 50%; background: var(--c); border: 2px solid rgba(5, 8, 20, 0.8); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; }
.swatch::after { display: none; }
.swatch:hover { box-shadow: 0 0 0 2px var(--accent); }
.swatch.any { position: relative; overflow: hidden; background: conic-gradient(#ef476f, #ffd166, #06d6a0, #6d95ff, #b89aff, #ef476f); }
.swatch.any input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.hg-join { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(360px, calc(100% - 32px)); display: grid; gap: 10px; justify-items: center; text-align: center; background: rgba(12, 18, 40, 0.92); }
.hg-join h2 { margin: 0; font-size: var(--fs-6); }
.hg-join p { margin: 0; }
.hg-pick { display: flex; gap: 8px; width: 100%; }
.hg-pick select { flex: 1; min-width: 0; }
@media (max-width: 860px) {
  .hg-bar { bottom: auto; top: 46px; right: auto; left: 10px; justify-content: flex-start; max-width: calc(100% - 190px); }
  .hg-colors { bottom: auto; top: calc(100% + 8px); left: 0; right: auto; max-width: calc(100vw - 80px); }
  #hg-mini { width: 120px; height: 80px; }
  .hg-log { max-height: 20vh; }
}
/* Phones: the emotes open from one button, like the colors, so the map stays clear. */
@media (max-width: 520px) {
  .hg-emotebtn { display: inline-block; }
  .hg-emotes { position: absolute; top: calc(100% + 8px); left: 0; width: max-content; display: grid; grid-template-columns: repeat(3, auto); padding: 8px; border-radius: 10px; background: rgba(5, 8, 20, 0.85); border: 1px solid var(--line-2); }
  .hg-bar:not(.emotes-open) .hg-emotes { display: none; }
}
/* Screenshots (?clean): the world alone. */
body.hg-clean .top, body.hg-clean .hg-stage > :not(canvas) { display: none; }
/* A player's card, opened by clicking them. */
.hg-card { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; padding: 8px 14px 8px 8px; border-radius: 10px; background: rgba(8, 12, 28, 0.9); border: 1px solid var(--line-2); max-width: calc(100% - 420px); }
.hg-card img { width: 40px; height: 40px; image-rendering: pixelated; border-radius: 4px; }
.hg-card img.discord { border-radius: 50%; image-rendering: auto; }
.hg-card-ghost { width: 40px; height: 40px; border-radius: 50% 50% 6px 6px; background: #dfe6ff; opacity: 0.85; }
.hg-card > div { display: grid; gap: 1px; min-width: 0; }
.hg-card b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hg-card-acts { display: flex; gap: 12px; font-size: var(--fs-3); }
.hg-card-acts:empty { display: none; }
.hg-card-acts .link { padding: 0; font-size: var(--fs-3); }
.hg-notes { display: grid; gap: 6px; max-width: 340px; padding: 4px 2px 4px 6px; }
.hg-notes p { margin: 0; }
.hg-x { align-self: flex-start; flex: none; width: 28px; height: 28px; margin: -2px -8px 0 0; padding: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 18px; line-height: 1; box-shadow: none; }
.hg-x::after { display: none; }
.hg-x:hover { color: var(--text); background: var(--panel-2); }
.hg-card:has(.hg-notes) { cursor: pointer; }
@media (max-width: 860px) { .hg-card { top: auto; bottom: calc(20vh + 70px); max-width: calc(100% - 20px); } }
@media (max-width: 520px) { .hg-zoom button { width: 40px; height: 40px; } .hg-join button { min-height: 40px; } }
