:root {
  /* Theme: black, purple, blue */
  --bg: #07060f;
  --panel: #120f24;
  --panel-2: #1b1736;
  --line: #2c2752;
  --text: #ece9ff;
  --muted: #9590b8;
  --accent: #4f7cff;     /* blue: buttons, active tabs, focus */
  --accent-2: #8b5cf6;   /* purple: second stop of the accent gradient */
  --accent-grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  --on-accent: #fff;
  --accent-text: #8fa9ff; /* lighter blue for text on dark backgrounds */
  /* Status colours (unchanged) */
  --good: #4fd18b;
  --bad: #e5646e;
  --solo: #ff8a3d;
  --duo: #c08bff;
  --trio: #5cc8ff;
  --master: #ff9f1c;
  --possible: #a259ff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(139,92,246,.16), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(79,124,255,.12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
/* The hidden attribute always hides, even on elements styled with display: flex (e.g. the header tabs) */
[hidden] { display: none !important; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(10,8,24,.96), rgba(18,14,40,.96), rgba(10,14,34,.96));
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 10;
}
/* Top left of the header: logo (home) + player tabs */
.top-left { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 900; font-size: 18px; letter-spacing: .3px; white-space: nowrap; }
.brand:hover img { box-shadow: 0 0 0 2px var(--accent-2); }
.brand img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; object-position: center 30%; box-shadow: 0 0 0 1px rgba(139,92,246,.4); }
.tabs { display: flex; gap: 4px; }
.tabs a {
  padding: 8px 14px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 800; font-size: 17px;
}
.tabs a:hover { color: var(--text); background: var(--panel); }
.tabs a.on { color: var(--on-accent); background: var(--accent-grad); }

/* Top right of the header: "possible" toggle + Admin link */
.top-right {
  position: absolute; right: 28px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; gap: 18px;
}
.admin-link { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 14px; padding: 6px 10px; border-radius: 6px; }
.admin-link:hover { color: var(--text); background: var(--panel); }
.admin-link.on { color: var(--on-accent); background: var(--accent-grad); }

/* Header toggle for purple "possible" badges */
.toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 0; color: var(--muted); font-size: 14px; cursor: pointer;
}
.toggle .switch {
  width: 34px; height: 20px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s;
}
.toggle .switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--text); transition: transform .15s;
}
.toggle.on { color: var(--text); }
.toggle.on .switch { background: var(--possible); }
.toggle.on .switch::after { transform: translateX(14px); }

.search { display: flex; flex: 1; max-width: 560px; }
.search input {
  flex: 1;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-right: 0;
  color: var(--text);
  border-radius: 8px 0 0 8px;
  font-size: 15px;
  outline: none;
}
.search input:focus { border-color: var(--accent); }
.search button {
  padding: 0 18px;
  background: var(--accent-grad);
  color: var(--on-accent);
  border: 0;
  font-weight: 700;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
}

main { flex: 1; width: 100%; max-width: 1480px; margin: 0 auto; padding: 32px 24px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px; }

.hero { text-align: center; padding: 80px 0 40px; }
.hero h1 { font-size: 44px; margin: 0 0 8px; letter-spacing: 1px; }
.hero p { color: var(--muted); margin: 0; }

.status { color: var(--muted); text-align: center; padding: 40px 0; }
.status.error { color: var(--bad); }

/* Search results */
.results { display: grid; gap: 10px; }
.result {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
}
.result:hover { border-color: var(--accent); }
.result img { width: 32px; height: 32px; border-radius: 4px; }
.result .code { color: var(--muted); }

/* Player page */
.player-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.player-head h1 { margin: 0; font-size: 32px; }
.player-head .code { color: var(--muted); font-size: 20px; }

.stats { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.stats .stat { flex: 1 1 170px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.stat .n { font-size: 26px; font-weight: 700; }
.stat .l { color: var(--muted); font-size: 13px; }

h2 { font-size: 18px; margin: 28px 0 12px; }

.legend { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend { align-items: center; }
.legend .flip-all { margin-left: auto; gap: 8px; }
.legend .flip-all .views { gap: 0; }

/* Cards sit in a row and wrap onto the next line when there's no room */
.raids { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.raids > .raid-card { width: 340px; max-width: 100%; }

/* Flip card: both faces share one grid cell, so the card is as tall as the taller face */
.raid-card { perspective: 1200px; }
.raid-card .flip-inner { display: grid; transition: transform .5s; transform-style: preserve-3d; }
.raid-card .face {
  grid-area: 1 / 1; min-width: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden;
  /* fixed height so every view (clears, full, flawless) is the same size */
  height: 400px; display: flex; flex-direction: column;
}
.raid-card .back { transform: rotateY(180deg); }

.views { display: flex; flex: none; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: rgba(7,6,15,.75); }
.views button {
  width: 28px; height: 26px; border: 0; background: none; color: var(--muted);
  font-weight: 700; font-size: 13px; cursor: pointer;
}
.views button + button { border-left: 1px solid var(--line); }
.views button:hover { color: var(--text); }
.views button.on { background: var(--accent-grad); color: var(--on-accent); }

/* Banner: image placeholder with the raid name over it */
.raid-card .banner {
  position: relative; flex: 1; min-height: 0;
  background: linear-gradient(135deg, #2b2358, #12183a);
}
/* Raid image (public/img/raids), cropped to fill; the gradient shows for raids without one */
.raid-card .banner[style] { background-size: cover; background-position: center 35%; }
.raid-card .banner .views { position: absolute; top: 10px; right: 10px; }
.raid-card .banner-text {
  position: absolute; inset: auto 0 0 0; padding: 14px;
  background: linear-gradient(180deg, transparent, rgba(7,6,15,.88));
}
.raid-card .name { font-weight: 800; font-size: 22px; line-height: 1.2; text-transform: uppercase; }

.raid-card .body { padding: 18px 16px 16px; }

/* One row of dots that scrolls sideways, total clears on the right */
.raid-card .track { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.raid-card .dots {
  flex: 1; min-width: 0;
  display: flex; flex-wrap: nowrap; gap: 9px;
  /* room around each dot so the bigger hovered dot and its ring aren't cut off */
  overflow-x: auto; padding: 8px 8px 10px;
  border-bottom: 2px solid var(--muted);
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.raid-card .dots .dot { flex: none; }
.raid-card .dots::-webkit-scrollbar { height: 6px; }
.raid-card .dots::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.raid-card .total { text-align: center; flex: none; }
.raid-card .total .n { font-size: 24px; font-weight: 800; }
.raid-card .total .l { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }

.raid-card .times { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding-top: 14px; }
.raid-card .times .n { color: #b9c8ff; font-weight: 700; }
.raid-card .times .n a { text-decoration: underline dotted; text-underline-offset: 3px; }
.raid-card .times .n a:hover { color: var(--accent-text); }
.raid-card .times .l { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }

/* Badge views (2 full clears, 3 flawless) */
.raid-card .back-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 14px 16px 10px; }
/* long names (e.g. Epic Desert Perpetual) wrap to 2 lines; badges are compact so it all still fits */
.raid-card .back-head .name { font-size: 16px; }
/* View name sits in the bottom right corner of the card */
.raid-card .back-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 0 16px 10px; }
.raid-card .back-sub { color: var(--muted); font-size: 12px; margin-left: auto; }
.raid-card .face > .status { padding: 40px 16px; }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 16px 10px; }
.badge {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2);
  text-decoration: none; text-align: center;
}
a.badge:hover { border-color: var(--accent); }
.badge.locked { opacity: .3; }
.badge-gap { visibility: hidden; }
.b-icon { width: 56px; height: 47px; fill: none; stroke-width: 2.5; stroke-linejoin: round; }
.b-green { stroke: var(--good); }
.b-orange { stroke: var(--master); }
.b-purple { stroke: var(--possible); }
.badge.possible { border-style: dashed; border-color: var(--possible); }
.badge.possible.locked { opacity: .6; }
.b-label { font-size: 12px; font-weight: 600; }
.b-count { font-size: 12px; color: var(--muted); }

.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
a.dot { cursor: pointer; transition: transform .1s; }
a.dot:hover { transform: scale(1.3); outline: 2px solid var(--text); outline-offset: 1px; }
.dot.green { background: var(--good); }
.dot.orange { background: var(--master); }

.table-wrap { overflow-x: auto; }
.note { color: var(--muted); font-size: 12px; }

table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--muted); font-weight: 600; background: var(--panel-2); }
tr:last-child td { border-bottom: 0; }
td a { color: var(--accent-text); text-decoration: none; }

.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.ok { background: rgba(79,209,139,.15); color: var(--good); }
.pill.no { background: rgba(229,100,110,.15); color: var(--bad); }
.pill.solo { background: rgba(255,138,61,.18); color: var(--solo); }
.pill.duo { background: rgba(192,139,255,.18); color: var(--duo); }
.pill.trio { background: rgba(92,200,255,.18); color: var(--trio); }

/* Not enough room for tabs | search | toggle overlaid: lay them out side by side */
@media (max-width: 1700px) {
  .topbar { justify-content: space-between; gap: 16px; }
  .top-left, .top-right { position: static; transform: none; }
}

@media (max-width: 640px) {
  .topbar { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
  .top-right { position: static; transform: none; }
  .top-left { position: static; transform: none; order: -1; width: 100%; justify-content: center; flex-wrap: wrap; }
}

/* ---------- Player page extras ---------- */
.saved-tag { font-size: 12px; color: var(--good); border: 1px solid var(--good); border-radius: 999px; padding: 1px 8px; align-self: center; }
.small-btn {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 6px;
  padding: 3px 10px; font-size: 12px; cursor: pointer; align-self: center;
}
.small-btn:hover { border-color: var(--accent); }
.report-btn { margin-left: auto; color: var(--muted); }
.banner-msg { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-weight: 600; }
.banner-msg.bad { background: rgba(229,100,110,.12); color: var(--bad); border: 1px solid rgba(229,100,110,.4); }

/* Runs waiting for verification: dashed ring, don't count yet */
.dot.pending { background: transparent; box-shadow: none; border: 2px dashed var(--good); }
.dot.orange.pending { border-color: var(--master); }
.raid-card .total .pending-n, .b-pending { font-size: 11px; color: var(--accent-text); }
.pill.pend { background: rgba(79,124,255,.18); color: var(--accent-text); }
.report-link { color: var(--muted) !important; font-size: 12px; }

/* Report dialog */
.report-dialog {
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px; width: min(440px, calc(100vw - 32px));
}
.report-dialog::backdrop { background: rgba(0,0,0,.6); }
.report-dialog h2 { margin: 0 0 6px; }
.report-dialog .r-what { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
.report-dialog textarea {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; font: inherit; resize: vertical;
}
.report-dialog .r-msg { min-height: 1.2em; font-size: 13px; color: var(--accent-text); margin: 6px 0; }
.report-dialog .r-buttons { display: flex; justify-content: flex-end; gap: 8px; }
.report-dialog button, .admin-form button, .actions button, .result button {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 6px;
  padding: 5px 12px; cursor: pointer; font-size: 13px;
}
.report-dialog button.primary { background: var(--accent-grad); color: var(--on-accent); border-color: var(--accent); font-weight: 700; }
.actions button:hover, .admin-form button:hover, .result button:hover { border-color: var(--accent); }
button:disabled { opacity: .5; cursor: default; }

/* ---------- Admin page ---------- */
.admin-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.admin-tabs a { padding: 6px 12px; border-radius: 6px; text-decoration: none; color: var(--muted); font-weight: 700; }
.admin-tabs a:hover { color: var(--text); background: var(--panel); }
.admin-tabs a.on { color: var(--on-accent); background: var(--accent-grad); }
.admin-tabs .count { background: var(--bad); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 12px; margin-left: 4px; }
.admin-form { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.admin-form input, .admin-form select {
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; font-size: 14px;
}
.admin-form input[name="target"], .admin-form input[name="id"], .admin-form input[name="q"] { flex: 1 1 220px; }
.actions { white-space: nowrap; }
.actions button + button { margin-left: 4px; }
td.reason { max-width: 360px; white-space: pre-wrap; word-break: break-word; }
td .sub { color: var(--muted); font-size: 12px; }
tr.muted-row td { opacity: .55; }
#saved-results .result { justify-content: space-between; }

/* ---------- PGCR page ---------- */
.pill.master { background: rgba(255,159,28,.18); color: var(--master); }

/* Two columns: run card (like the raid cards) on the left, status / fireteam / admin on the right */
.run-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 820px) { .run-layout { grid-template-columns: minmax(0, 1fr); } .run-layout > * { min-width: 0; } }
.run-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.run-banner {
  position: relative; height: 190px;
  background: linear-gradient(135deg, #2b2358, #12183a) center 35% / cover no-repeat;
}
.run-banner .banner-text {
  position: absolute; inset: auto 0 0 0; padding: 14px;
  background: linear-gradient(180deg, transparent, rgba(7,6,15,.88));
}
.run-banner .name { font-weight: 800; font-size: 22px; line-height: 1.2; text-transform: uppercase; }
.run-banner .diff { color: var(--muted); font-size: 13px; }
.run-kind { display: flex; align-items: center; gap: 14px; padding: 16px; border-bottom: 1px solid var(--line); }
.run-kind .k { font-size: 20px; font-weight: 800; }
.run-kind.b-green .k { color: var(--good); }
.run-kind.b-orange .k { color: var(--master); }
.run-kind .s { color: var(--muted); font-size: 13px; }
.b-muted { stroke: var(--muted); }
.run-kind.b-muted .k { color: var(--muted); }
.run-facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 6px 8px 12px; }
.run-facts > div { padding: 8px; }
.run-facts dt { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.run-facts dd { margin: 0; font-weight: 700; color: #b9c8ff; }
.run-facts .mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; font-weight: 400; color: var(--muted); word-break: break-all; }
.run-status {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; padding: 12px 14px;
}
.run-status .actions { display: flex; gap: 6px; }
.run-h { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 22px 0 8px; }
.pgcr-player { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.pgcr-player img { width: 26px; height: 26px; border-radius: 4px; }
.pgcr-player .code { color: var(--muted); font-weight: 400; margin-left: 2px; }
.pgcr-admin { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 14px; }
.pgcr-admin h2 { margin: 0 0 10px; font-size: 20px; }
.pgcr-admin h3 { margin: 22px 0 8px; font-size: 16px; }
.pgcr-admin input[name="note"] { flex: 1 1 260px; }
.admin-players { display: flex; flex-direction: column; gap: 6px; max-width: 640px; }
.admin-players .result { display: flex; align-items: center; justify-content: space-between; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }

/* Send verification dialog */
.report-dialog .field { display: block; font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.report-dialog .field select, .report-dialog .field input {
  display: block; width: 100%; margin-top: 4px; background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit;
}
.report-dialog .field textarea { margin-top: 4px; }

/* Admin view: a marker in the header so the two views are easy to tell apart */
body.admin-mode .topbar { border-bottom: 2px solid var(--accent); }

/* PGCR page: a player who left before the end */
.pgcr-table tr.left-row td { background: rgba(229,100,110,.12); color: var(--bad); }
.pgcr-table tr.left-row td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.pgcr-table tr.left-row .pgcr-player, .pgcr-table tr.left-row .pgcr-player .code { color: var(--bad); }

/* PGCR fireteam table: name on the left, everything else right-aligned */
.pgcr-table { width: 100%; }
.pgcr-table th.num, .pgcr-table td.num { text-align: right; width: 1%; white-space: nowrap; padding-left: 22px; }

/* ---------- Account: login button + menu (top right) ---------- */
.account { position: relative; }
.login-btn {
  background: var(--accent-grad); color: var(--on-accent); border: 0; border-radius: 8px;
  padding: 7px 14px; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.login-btn:hover { filter: brightness(1.1); }
.acct-btn {
  display: flex; align-items: center; gap: 8px; background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px 3px 3px; cursor: pointer; font-weight: 700; font-size: 14px;
}
.acct-btn:hover, .acct-btn[aria-expanded="true"] { border-color: var(--accent); }
.acct-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; }
.acct-avatar.big { width: 44px; height: 44px; }
.avatar-blank { display: inline-grid; place-items: center; background: var(--accent-grad); color: #fff; font-weight: 800; }
.caret { width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 2; }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 10px); width: 270px; z-index: 20;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,.55), 0 0 0 1px rgba(139,92,246,.08);
}
.acct-head { display: flex; align-items: center; gap: 12px; padding: 14px; background: linear-gradient(135deg, rgba(79,124,255,.14), rgba(139,92,246,.14)); }
.acct-head .n, .acct-who .n { font-weight: 800; }
.acct-head .code, .acct-who .code { color: var(--muted); font-weight: 400; margin-left: 2px; }
.acct-head .s, .acct-who .s { color: var(--muted); font-size: 12px; }
.acct-menu [role="menuitem"] {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 13px 16px; border: 0; border-top: 1px solid var(--line); background: none;
  color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; text-align: left;
}
.acct-menu [role="menuitem"]:hover { background: var(--panel-2); }
.acct-menu [data-logout]:hover { color: var(--bad); }
.chev { width: 16px; height: 16px; fill: none; stroke: var(--accent-text); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* #/account page */
.acct-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; max-width: 820px; }
.acct-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.acct-card-head { display: flex; align-items: center; gap: 10px; width: 100%; }
.acct-card-head h2 { margin: 0; font-size: 18px; flex: 1; }
.acct-card .note { margin: 0; }
.acct-who { display: flex; align-items: center; gap: 12px; }
.svc { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 900; color: #fff; }
.svc.bungie { background: var(--accent-grad); }
.svc.discord { background: #5865f2; }
a.small-btn { text-decoration: none; display: inline-block; }
.logout-btn { margin-top: 18px; }
.logout-btn:hover { border-color: var(--bad); color: var(--bad); }

/* Full clears: best-lowman tags on the top left of each raid card */
.raid-card .raid-tags {
  position: absolute; top: 10px; left: 10px; max-width: calc(100% - 120px);
  display: flex; flex-wrap: wrap; gap: 6px;
}
.raid-tag {
  background: rgba(7,6,15,.72); backdrop-filter: blur(4px); color: var(--text);
  border: 1px solid rgba(255,255,255,.14); border-radius: 6px;
  padding: 3px 9px; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.raid-tag.master { border-color: rgba(255,159,28,.55); }

/* Auto-blacklist: the runs that triggered it, under the player banner */
.auto-runs { margin-top: 6px; font-size: 13px; font-weight: 400; opacity: .9; }
.auto-runs a { color: inherit; text-decoration: underline; }

/* Runs with a blacklisted player: shown, but don't count */
.dot.grey { background: #5b5873; }
.pill.muted { background: rgba(149,144,184,.15); color: var(--muted); }

/* Run that used a bug: grey dot with a "!" */
.dot.warn { display: inline-grid; place-items: center; box-shadow: 0 0 0 1.5px #f5c542 inset; }
.dot.warn::after { content: "!"; color: #f5c542; font: 900 10px/1 system-ui, sans-serif; }
.pill.warn { background: rgba(245,197,66,.16); color: #f5c542; }

/* ---------- Every badge collected: coloured border (all views) ---------- */
/* Drawn as an overlay so it sits on top of the raid image too */
.raid-card .badge-face { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.badge-face.complete-gold::after, .badge-face.complete-purple::after {
  content: ""; position: absolute; inset: 0; border-radius: 9px; pointer-events: none; z-index: 5;
}
/* Gold: everything collected (possible toggle off, or nothing possible left) */
.badge-face.complete-gold::after { box-shadow: inset 0 0 0 3px #d4af37; }
/* Purple: everything collected, possible ones too (toggle on) */
.badge-face.complete-purple::after { box-shadow: inset 0 0 0 3px var(--accent-2); }

/* ---------- Mastery tab: one row per role (picture | requirements | status) ---------- */
.m-rows { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.m-row {
  display: grid; grid-template-columns: 220px 1fr; min-height: 110px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.m-row.complete { border-color: #d4af37; box-shadow: 0 0 0 1px #d4af37; }
.m-row.master-all { margin-top: 8px; min-height: 70px; }
.m-pic {
  position: relative; display: flex; align-items: flex-end; padding: 12px;
  background: var(--accent-grad); background-size: cover; background-position: center 35%;
  border-right: 1px solid var(--line);
}
.m-pic[style]::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(7,6,15,.85), rgba(7,6,15,.1) 70%); }
.m-name { position: relative; font-weight: 800; font-size: 16px; text-transform: uppercase; letter-spacing: .3px; text-shadow: 0 1px 4px rgba(0,0,0,.7); }
.m-row.complete .m-name { color: #f0d77a; }
.m-body { margin: 0; padding: 4px 18px; list-style: none; display: flex; flex-direction: column; justify-content: center; }
.m-reqs li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.m-reqs li:first-child { border-top: 0; }
.m-label { flex: 1; min-width: 0; font-weight: 600; }
.m-extra { display: flex; align-items: center; gap: 8px; font-size: 13px; flex: none; }
.m-rejected { color: var(--bad); font-size: 12px; }
.m-st { flex: none; min-width: 26px; text-align: center; font-weight: 900; font-size: 18px; line-height: 1; }
.m-st.ok { color: var(--good); }
.m-st.no { color: var(--bad); }
.m-st.wait { color: #f5c542; font-size: 14px; font-weight: 800; }
.m-all { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.m-all > span:first-child { flex: 1; }
.m-count { color: var(--muted); font-size: 13px; font-weight: 700; }
@media (max-width: 640px) {
  .m-row { grid-template-columns: 1fr; }
  .m-pic { min-height: 80px; border-right: 0; border-bottom: 1px solid var(--line); }
}

/* "@Pantheon Mastery" requirement on the Ascendant tab looks like a role tag */
.m-label.m-role-req { flex: 0 1 auto; margin-right: auto; background: rgba(139,92,246,.18); color: #c4a8ff; padding: 2px 8px; border-radius: 6px; font-weight: 700; }

.m-reqs li.m-note-row { color: var(--muted); font-style: italic; font-size: 13px; }

/* ---------- Home page: logo, name, Useful links | Lowman guide ---------- */
.home-hero { padding: 48px 0 24px; }
.home-logo { width: 140px; height: 140px; border-radius: 26px; object-fit: cover; object-position: center 32%; box-shadow: 0 0 0 1px rgba(139,92,246,.35), 0 20px 60px rgba(139,92,246,.22); }
.home-hero h1 { margin-top: 16px; }
.home-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 1100px; margin: 10px auto 40px; align-items: start; }
.home-panel h2 { margin: 0 0 10px; font-size: 18px; }
.home-list { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; min-height: 220px; padding: 6px; }
.home-item { display: grid; grid-template-columns: 1fr auto; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--text); }
.home-item .t { font-weight: 700; }
.home-item .d { grid-column: 1; color: var(--muted); font-size: 13px; }
.home-item .arrow { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--accent-text); }
a.home-item:hover { background: var(--panel-2); }
.home-list > .note { padding: 10px 12px; margin: 0; }
@media (max-width: 760px) { .home-panels { grid-template-columns: 1fr; } }

/* Lowman guide: picture tiles */
.home-list.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px; align-content: start; }
.guide-tile { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; text-decoration: none; color: var(--text); background: var(--panel-2); }
a.guide-tile:hover { border-color: var(--accent); }
a.guide-tile:hover .g-pic { filter: brightness(1.12); }
.g-pic { height: 90px; background: var(--accent-grad); background-size: cover; background-position: center 35%; }
.g-name { padding: 8px 10px; font-weight: 700; font-size: 14px; border-top: 1px solid var(--line); }
.guide-soon { grid-column: 1 / -1; color: var(--muted); font-size: 13px; font-style: italic; padding: 2px 2px 0; }
@media (max-width: 480px) { .home-list.guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Clear during an exploit window: normal dot with a "!" (still counts) */
.dot.flagged { display: inline-grid; place-items: center; }
.dot.flagged::after { content: "!"; color: #07060f; font: 900 10px/1 system-ui, sans-serif; }
/* Appeal button under the blacklist banner */
.appeal-line { margin-top: 8px; }

/* Player name on their Bungie emblem (the wide nameplate art; its square icon sits on the left) */
.player-head:has(.nameplate) { align-items: center; }
.nameplate {
  display: flex; align-items: center; gap: 6px; flex: none; white-space: nowrap; overflow: hidden;
  width: 400px; height: 81px; /* the emblem art is 474 x 96: same shape, a bit smaller */
  padding: 0 14px 0 98px; box-sizing: border-box;
  background-size: cover; background-position: left center; border-radius: 6px;
}
.nameplate h1 { font-size: 23px; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.nameplate .code { color: rgba(255,255,255,.75); text-shadow: 0 1px 3px rgba(0,0,0,.8); font-size: 15px; flex: none; }

/* Several links in one request */
.links-field .links { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 6px; }
.link-row { display: flex; gap: 6px; align-items: center; }
.link-row input { flex: 1; min-width: 0; }
.link-x { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 6px; width: 28px; height: 28px; cursor: pointer; flex: none; }
.link-x:hover { color: var(--bad); border-color: var(--bad); }
.links-field .add-link { align-self: flex-start; }

/* ---------- Historical raids: dotted purple border, dotted gold when everything is collected ---------- */
.badge-face.hist::after {
  content: ""; position: absolute; inset: 0; border-radius: 9px; pointer-events: none; z-index: 5;
  border: 3px dotted var(--accent-2);
}
.badge-face.hist.complete-hist::after { border-color: #d4af37; }

/* Flip-all buttons in the legend show their names ("1 Clears", "2 Full Runs", "3 Flawless") */
.legend .flip-all .views button { width: auto; padding: 0 12px; white-space: nowrap; }

/* Mod view (localhost:3002, or a mod's Discord login): purple line under the header */
body.mod-mode .topbar { border-bottom: 2px solid var(--accent-2); }

/* Dot cards next to the name: one row (wraps on narrow screens), dot on top, raid label in a box below. Greyed out for now. */
.raid-orbs { display: flex; flex-wrap: wrap; gap: 8px; margin-left: 18px; align-self: center; } /* one row when there's room */
.orb-card { min-width: 62px; }
.orb-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 6px 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
}
/* 40px: room for the role icons that will replace the plain dots */
.orb { width: 40px; height: 40px; border-radius: 50%; background: #3a3654; background-size: cover; background-position: center; }
.orb-label {
  width: 100%; box-sizing: border-box; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); min-width: 44px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 2px;
  white-space: nowrap;
}
.orb-card:hover { border-color: var(--accent); }

/* Dot colours: highest role for that raid */
.orb.lv-mastery { background-color: var(--good); box-shadow: 0 0 10px rgba(79,209,139,.55); }
.orb.lv-asc { background-color: var(--master); box-shadow: 0 0 10px rgba(255,159,28,.55); }
.orb.lv-gm { background-color: #a855f7; box-shadow: 0 0 10px rgba(168,85,247,.6); }
/* Legend to the right of the dot cards */
.orb-legend { display: flex; flex-direction: column; gap: 6px; margin-left: 12px; align-self: center; font-size: 13px; color: var(--muted); }
.orb-legend span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.orb-legend .orb { width: 12px; height: 12px; box-shadow: none; }

/* Header dot cards are links to the next role to work on */
.orb-card[data-role] { cursor: pointer; }
/* Row a dot click jumped to: brief highlight */
.m-row.m-flash { box-shadow: 0 0 0 2px var(--accent), 0 0 24px rgba(79,124,255,.35); transition: box-shadow .3s; }

/* ---------- Notifications (own profile) ---------- */
.notifs { background: var(--panel, #161b22); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; }
.notifs-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.notifs-head h2 { font-size: 15px; margin: 0; }
.notif { display: flex; align-items: center; gap: 10px; padding: 7px 0 7px 10px; border-left: 3px solid #3fb950; margin: 4px 0; }
.notif.bad { border-left-color: #f85149; }
.notif-text { flex: 1; }
.notif-text a { color: inherit; }
.notif-count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: #f85149; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
/* ---------- Admin: appeals ---------- */
.appeal-card { border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.appeal-card.done { opacity: .6; }
.appeal-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.appeal-status { margin-left: auto; }
.appeal-text { white-space: pre-wrap; margin-bottom: 6px; }
.appeal-card .admin-form { margin-top: 10px; }

/* ---------- PGCR page: status marks next to the clear type, buttons without the status bar ---------- */
.run-mark { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-weight: 600; cursor: help; }
.run-mark i { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-style: normal; font-size: 12px; font-weight: 800; }
.run-mark.ok i { background: rgba(63,185,80,.2); color: #3fb950; }
.run-mark.no { color: #f85149; } .run-mark.no i { background: rgba(248,81,73,.2); color: #f85149; }
.run-mark.warn { color: #f5c542; } .run-mark.warn i { background: rgba(245,197,66,.2); color: #f5c542; }
.run-mark.pend { color: #8ab4ff; } .run-mark.pend i { background: rgba(138,180,255,.2); color: #8ab4ff; }
.run-actions { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.run-actions .actions { display: flex; gap: 6px; }

/* status marks sit on the right of the clear type, bigger */
.run-marks { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.run-marks .run-mark { margin-left: 0; font-size: 13px; }
.run-marks .run-mark i { width: 34px; height: 34px; font-size: 20px; order: 2; }

/* "… of All" row: name centred, coloured like the header dots (Mastery green, Ascendant orange, Grandmaster purple) */
.m-row.master-all .m-pic { align-items: center; justify-content: center; text-align: center; }
.m-row.master-all.all-mastery .m-pic { background: linear-gradient(135deg, #2fae6b, #4fd18b); }
.m-row.master-all.all-ascendant .m-pic { background: linear-gradient(135deg, #e07b00, #ff9f1c); }
.m-row.master-all.all-grandmaster .m-pic { background: linear-gradient(135deg, #7c3aed, #a855f7); }

/* Emblem border for the "… of All" roles (same colours as the header dots) */
.nameplate.all-mastery { box-shadow: 0 0 0 3px var(--good), 0 0 14px rgba(79,209,139,.55); }
.nameplate.all-asc { box-shadow: 0 0 0 3px var(--master), 0 0 14px rgba(255,159,28,.55); }
.nameplate.all-gm { box-shadow: 0 0 0 3px #a855f7, 0 0 16px rgba(168,85,247,.6); }

/* ---------- Phones: everything fits the screen width (no sideways scrolling) ---------- */
@media (max-width: 640px) {
  html, body { overflow-x: hidden; }
  main { padding: 18px 12px; }
  /* Header: logo, then the tabs (all five visible, wrapping if needed), search, then the switches + account */
  .tabs { flex-wrap: wrap; justify-content: center; gap: 4px; width: 100%; }
  .tabs a { font-size: 14px; padding: 6px 10px; white-space: nowrap; }
  .search { flex: 1 1 100%; max-width: none; }
  .search input { min-width: 0; }
  .top-right { width: 100%; justify-content: center; flex-wrap: wrap; gap: 10px 16px; }
  .toggle { font-size: 13px; white-space: nowrap; }
  /* Player header: emblem fits the width, dot cards smaller (6 per row), legend in one line */
  .nameplate { width: 100%; max-width: 400px; height: auto; aspect-ratio: 474 / 96; padding-left: 22%; }
  .nameplate h1 { font-size: 19px; }
  .nameplate .code { font-size: 13px; }
  .raid-orbs { margin-left: 0; width: 100%; gap: 6px; justify-content: flex-start; }
  .orb-card { min-width: 0; width: calc((100% - 30px) / 6); padding: 6px 2px 4px; gap: 4px; }
  .orb { width: 28px; height: 28px; }
  .orb-label { min-width: 0; font-size: 10px; padding-left: 0; padding-right: 0; }
  .orb-legend { flex-direction: row; flex-wrap: wrap; margin-left: 0; gap: 6px 14px; font-size: 12px; }
  .report-btn { margin-left: 0; }
  .raids > .raid-card { width: 100%; }
  /* Run page */
  .run-banner .name { font-size: 18px; overflow-wrap: anywhere; }
  .run-actions { justify-content: flex-start; }
  .run-actions .actions { flex-wrap: wrap; }
  .pgcr-admin .admin-form > * { flex: 1 1 auto; }
  .admin-players .result { flex-wrap: wrap; gap: 6px; }
  .admin-players .result .actions { display: flex; flex-wrap: wrap; gap: 6px; }
}

/* Home page: About us (full width under the two panels) */
.home-about { margin-top: 20px; }
.home-about p { margin: 0 0 12px; line-height: 1.6; color: var(--muted); }
.home-about p:last-child { margin-bottom: 0; }

/* Contact support (Discord), fixed at the bottom right of every page */
.support-btn {
  position: fixed; right: 18px; bottom: 18px; z-index: 20;
  display: block; width: 92px; height: 92px; border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(139,92,246,.45); box-shadow: 0 4px 18px rgba(0,0,0,.55);
  transition: transform .15s, box-shadow .15s;
}
/* the picture has wide black edges: zoom in a little so the logo and text fill the button */
.support-btn img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.25); display: block; }
.support-btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px #8b5cf6, 0 6px 22px rgba(139,92,246,.45); }
@media (max-width: 640px) { .support-btn { right: 12px; bottom: 12px; width: 68px; height: 68px; border-radius: 14px; } }

/* Tags on raid cards link to the first clear of that kind */
a.raid-tag { text-decoration: none; cursor: pointer; }
a.raid-tag:hover { filter: brightness(1.25); box-shadow: 0 0 0 1px currentColor; }

/* Weekly surges box in the stats row */
/* Title on top, then one tile per surge spread across the box (like the sketch) */
.surge-box { display: flex; flex-direction: column; gap: 8px; }
.surge-box .surge-title { color: var(--muted); font-size: 13px; font-weight: 700; }
.surge-box .surge-list { flex: 1; display: flex; align-items: center; justify-content: space-around; gap: 12px; font-size: 16px; font-weight: 700; }
.surge-box .surge {
  display: grid; place-items: center; width: 46px; height: 38px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
}
.surge-box .surge img { width: 30px; height: 30px; object-fit: contain; }
.surge-box { cursor: help; }

/* Stats row: name at the top left (like "Weekly surges"), big number under it */
.stats .stat { display: flex; flex-direction: column; gap: 6px; }
.stats .stat .l { font-size: 13px; font-weight: 700; }
.stats .stat .n { font-size: 26px; line-height: 1.15; margin-top: auto; margin-bottom: auto; }

/* Report player at the right end of the legend row (after the 1 | 2 | 3 buttons) */
.legend .report-btn { margin-left: 4px; }

/* ---------- Solos page: one column of raid cards (raid | encounter rows with icons) ---------- */
.solo-list { display: flex; flex-direction: column; gap: 14px; }
.solo-card { display: grid; grid-template-columns: 200px 1fr; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.solo-raid {
  position: relative; display: flex; align-items: center; justify-content: center; padding: 14px; text-align: center;
  background: var(--accent-grad); background-size: cover; background-position: center; border-right: 1px solid var(--line);
  font-weight: 900; font-size: 26px; text-transform: uppercase; text-shadow: 0 1px 6px rgba(0,0,0,.9);
}
.solo-raid[style]::before { content: ""; position: absolute; inset: 0; background: rgba(7,6,15,.55); }
.solo-raid > span { position: relative; }
.solo-rows { display: flex; flex-direction: column; }
.solo-row { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--line); min-height: 26px; }
.solo-row:first-child { border-top: 0; }
.solo-name { flex: 1; font-weight: 700; }
.solo-marks { display: flex; align-items: center; gap: 12px; }
.solo-icon { width: 32px; height: 32px; }
.solo-icon.possible { box-shadow: 0 0 0 2px #a855f7; border-radius: 6px; padding: 2px; } /* purple outline = possible, not done */
.solo-dot { width: 22px; height: 22px; border-radius: 50%; background: #6b6884; }
.solo-dot.possible { background: transparent; box-shadow: 0 0 0 2px #a855f7 inset; }
.solo-tag { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: rgba(79,209,139,.18); color: var(--good); white-space: nowrap; }
.solo-tag.master { background: rgba(255,159,28,.18); color: var(--master); }
.solo-tag.possible { background: rgba(168,85,247,.2); color: #c4a8ff; }
@media (max-width: 640px) {
  .solo-card { grid-template-columns: 1fr; }
  .solo-raid { min-height: 60px; border-right: 0; border-bottom: 1px solid var(--line); font-size: 20px; }
  .solo-row { padding: 9px 12px; }
}

/* Solos: Master triangle, Challenge square, Master challenge star; the key on the right of the title */
.solo-shape { width: 24px; height: 24px; fill: #6b6884; } /* grey, like the No class circle */
.solo-shape.possible { fill: none; stroke: #a855f7; stroke-width: 2; stroke-linejoin: round; }
.solo-head { align-items: center; flex-wrap: wrap; }
.solo-key { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; color: var(--muted); font-size: 13px; }
.solo-key-item { display: inline-flex; align-items: center; gap: 6px; }
.solo-key .solo-icon { width: 22px; height: 22px; }
.solo-key .solo-dot, .solo-key .solo-shape { width: 18px; height: 18px; }
@media (max-width: 640px) { .solo-key { margin-left: 0; } }

/* Solos: raids with only one or two encounters (GoS, Epic DP) keep a proper-sized picture;
   their rows sit in the middle instead of a thin strip at the top */
.solo-card { min-height: 104px; }
.solo-rows { justify-content: center; }
.solo-rows .solo-row:only-child { border-top: 0; }

/* Solos key as a small "Legend" box */
.solo-key { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; }
.solo-key-title { font-weight: 800; color: var(--text); text-transform: uppercase; letter-spacing: .5px; font-size: 12px; }

/* Solos legend (top only): filled colours - green circle, orange triangle, green square, orange star.
   The marks in the list itself stay grey. */
.solo-key .solo-dot:not(.possible) { background: var(--good); }
.solo-key .solo-shape.square { fill: var(--good); }
.solo-key .solo-shape.triangle, .solo-key .solo-shape.star { fill: var(--master); } /* orange, like Master badges */

/* Solos: each mark is a button (send a video). Verified: class icons get a green ring, shapes are
   filled in their colour (circle / square green, triangle / star orange). Video sent: dashed ring. */
.solo-mark-btn { background: none; border: 0; padding: 2px; border-radius: 8px; cursor: pointer; display: inline-grid; place-items: center; line-height: 0; }
.solo-mark-btn:hover { background: rgba(255,255,255,.06); }
.solo-mark-btn.verified .solo-icon { box-shadow: 0 0 0 2px var(--good); border-radius: 6px; padding: 2px; }
.solo-mark-btn.verified .solo-dot { background: var(--good); }
.solo-mark-btn.verified .solo-shape.square { fill: var(--good); }
.solo-mark-btn.verified .solo-shape.triangle, .solo-mark-btn.verified .solo-shape.star { fill: var(--master); }
.solo-mark-btn.pending { outline: 2px dashed #f5c542; outline-offset: 1px; }
.solo-mark-btn.verified { cursor: default; }

/* Purple (possible) solos: outline = not done, filled purple = done (verified or from a clear) */
.solo-mark-btn.verified .solo-icon.possible { background: #a855f7; box-shadow: 0 0 0 2px #a855f7; }
.solo-mark-btn.verified .solo-dot.possible { background: #a855f7; box-shadow: none; }
.solo-mark-btn.verified .solo-shape.possible { fill: #a855f7; stroke: #a855f7; }
.solo-key .solo-dot.possible.filled { background: #a855f7; box-shadow: none; }

/* Header on narrower screens: if logo + tabs, search and the switches don't fit on one line,
   the search (and what follows) moves to a second line on the right instead of overlapping the tabs */
@media (max-width: 1700px) and (min-width: 641px) {
  .topbar { flex-wrap: wrap; row-gap: 10px; }
  .top-left { flex: none; }
  .tabs { flex-wrap: nowrap; }
  .tabs a { white-space: nowrap; }
  .search { flex: 1 1 340px; min-width: 300px; margin-left: auto; }
  .top-right { flex: none; margin-left: auto; }
}

/* Solos tab shown right of the search bar (when it would overlap it): same look as the tabs */
.solos-alt { padding: 8px 14px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 800; font-size: 17px; white-space: nowrap; }
.solos-alt:hover { color: var(--text); background: var(--panel); }
.solos-alt.on { color: var(--on-accent); background: var(--accent-grad); }
