/* Nerdcave guild site: the account in the top bar (js/auth.js) and the raid
   signups on Raids → Signups (js/signups.js). README.md "Logins and signups".
   Loaded by the guild pages and the tools page; the tools page has no
   guild.css, so every token has a fallback. */

/* the top bar's account ------------------------------------------------------- */
.account[hidden] { display: none; }
.account { position: relative; display: inline-flex; }
/* class colours where guild.css isn't loaded (the tools page): the same values,
   at no specificity, so guild.css's own rules stay the ones that count */
:where(.c-warrior) { --cc: #c69b6d; --ct: #d6ae83; }
:where(.c-paladin) { --cc: #f48cba; --ct: #f69cc4; }
:where(.c-hunter) { --cc: #aad372; --ct: #aad372; }
:where(.c-rogue) { --cc: #fff468; --ct: #fff468; }
:where(.c-priest) { --cc: #f0f0f0; --ct: #f0f0f0; }
:where(.c-shaman) { --cc: #3b7fe0; --ct: #6bb8ff; }
:where(.c-mage) { --cc: #3fc7eb; --ct: #3fc7eb; }
:where(.c-warlock) { --cc: #8788ee; --ct: #aeafff; }
:where(.c-druid) { --cc: #ff7c0a; --ct: #ff9433; }

/* the chip: the main's name in its class colour, to profile.html */
.acct-chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 4px; border-radius: 999px;
  border: 1px solid var(--line-2, rgba(255, 232, 190, .18)); background: rgba(255, 255, 255, .05); color: var(--text, #f6eedf);
  font: 600 13px/1 var(--font-ui, system-ui, sans-serif); text-decoration: none; transition: background .2s, border-color .2s; }
.acct-chip:hover { background: rgba(255, 255, 255, .1); border-color: color-mix(in srgb, var(--cc, #f2c14e) 55%, transparent); }
.acct-chip:focus-visible { outline: 2px solid var(--accent, #f2c14e); outline-offset: 2px; }
.acct-av { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: color-mix(in srgb, var(--cc, #8a8a8a) 35%, #120d08); border: 1px solid var(--cc, #8a8a8a);
  color: var(--ct, #f6eedf); font: 800 11px/1 var(--font-ui, system-ui, sans-serif); letter-spacing: .04em; }
.acct-name { max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ct, var(--text, #f6eedf)); }
.acct-role { padding: 3px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .02em;
  background: rgba(255, 255, 255, .08); color: var(--text-2, #d8ccb2); }
.acct-role.role-admin, .acct-role.role-officer { background: rgba(var(--accent-rgb, 242, 193, 78), .18); color: var(--accent, #f2c14e); }
.acct-role.role-raid_leader { background: rgba(127, 216, 240, .15); color: #9fe3f5; }
.acct-nudge { padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .02em; white-space: nowrap;
  background: var(--accent, #f2c14e); color: #1d1404; }
/* a narrower bar: the role chip goes, and "Pick your character" takes the name's place */
@media (max-width: 1366px) {
  .acct-role { display: none; }
  .acct-name { max-width: 14ch; }
  .acct-chip:has(.acct-nudge) .acct-name { display: none; }
}
/* below 1200 px guild.css hides the top bar's tools but the wallpaper button:
   on a phone the way in stays: "Log in" logged out, the account chip (its
   profile page has Log out) logged in. The tools page (shell.css) hides its tools there too. */
@media (max-width: 1200px) {
  .tools > .account:not([hidden]) { display: inline-flex; }
  html:not(.logged-in) .tools > [data-auth-button] { display: inline-flex; }
}
@media (max-width: 1200px) {
  html .ncp-shell .tools { display: flex; margin-left: auto; }
  html .ncp-shell .tools > :not(.account):not([data-auth-button]) { display: none; }
  html.logged-in .ncp-shell .tools > [data-auth-button] { display: none; }
}
@media (max-width: 760px) {
  .tools > [data-auth-button] { padding: 0 14px; font-size: 13px; }
}
@media (max-width: 760px) {
  .acct-name, .acct-role { display: none; }
  .acct-chip { padding: 0 4px; }
  /* a gold dot on the chip (its title and the hidden text still say "Pick your character") */
  .acct-nudge { width: 10px; height: 10px; padding: 0; overflow: hidden; font-size: 0; box-shadow: 0 0 0 2px #120d08; }
}

/* Raids → Signups: the roster and the form ---------------------------------------- */
.su-block[hidden] { display: none; }
.su-block { padding-top: 28px; padding-bottom: 8px; }
.su-block::before { display: none; }
.su-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(340px, 1fr); gap: 22px; align-items: stretch; }
.su-roster, .su-form { border-radius: var(--r, 22px); border: 1px solid var(--line, rgba(255, 232, 190, .1));
  background: linear-gradient(180deg, var(--card-2, #17130e), var(--card, #110e0b)); padding: 22px; }
.su-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.su-head .h3 { font-size: clamp(22px, 2vw, 28px); }
.su-count { font: 500 14px/1.3 var(--font-ui, system-ui, sans-serif); color: var(--text-3, #b3a68c); }
.su-count b { font-size: 20px; color: var(--accent, #f2c14e); }
.su-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.su-col { min-width: 0; }
.su-col-h { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 700 13px/1 var(--font-ui, system-ui, sans-serif);
  letter-spacing: .06em; text-transform: uppercase; color: var(--text-2, #d8ccb2); }
.su-col-h .ic { width: 16px; height: 16px; color: var(--accent, #f2c14e); }
.su-n { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .07); font-size: 12px; letter-spacing: 0; }
.su-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.su-list-flat { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.su-row { display: grid; gap: 3px; padding: 9px 10px; border-radius: 12px; background: rgba(255, 255, 255, .035); border: 1px solid transparent;
  font: 500 14px/1.3 var(--font-ui, system-ui, sans-serif); }
.su-row.is-mine { border-color: rgba(var(--accent-rgb, 242, 193, 78), .45); background: rgba(var(--accent-rgb, 242, 193, 78), .07); }
.su-who { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; min-width: 0; }
.su-name { color: var(--ct, var(--text, #f6eedf)); font-weight: 700; overflow-wrap: anywhere; }
.su-you, .su-spec, .su-tag { font-size: 12px; color: var(--text-3, #b3a68c); }
.su-you { color: var(--accent, #f2c14e); font-weight: 700; }
.su-tag { padding: 1px 7px; border-radius: 999px; font-weight: 700; }
.su-tag.su-tentative { background: rgba(244, 199, 108, .14); color: var(--warn, #f4c76c); }
.su-tag.su-late { background: rgba(159, 196, 255, .14); color: var(--late, #9fc4ff); }
.su-tag.su-bench { background: rgba(255, 255, 255, .08); color: var(--text-2, #d8ccb2); }
.su-note { font-size: 13px; color: var(--text-2, #d8ccb2); overflow-wrap: anywhere; }
.su-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.su-act { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line-2, rgba(255, 232, 190, .18));
  background: none; color: var(--text-2, #d8ccb2); font: 600 12px/1 var(--font-ui, system-ui, sans-serif); cursor: pointer; }
.su-act:hover, .su-act:focus-visible { color: var(--text, #f6eedf); background: rgba(255, 255, 255, .07); outline: none; }
.su-act .ic { width: 13px; height: 13px; }
.su-empty, .su-none, .su-closed, .su-hint { margin: 0; font: 500 14px/1.45 var(--font-ui, system-ui, sans-serif); color: var(--text-3, #b3a68c); }
.su-none { margin-top: 14px; }
.su-extra { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line, rgba(255, 232, 190, .1)); }
.su-side { display: grid; gap: 10px; }
.su-form { display: grid; gap: 14px; }
.su-form-h { margin: 0; font: 700 18px/1.2 var(--font-display, serif); letter-spacing: .02em; }
.su-field { display: grid; gap: 7px; }
.su-label { display: flex; align-items: baseline; gap: 8px; font: 700 12px/1 var(--font-ui, system-ui, sans-serif); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3, #b3a68c); }
.su-select, .su-input { width: 100%; height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2, rgba(255, 232, 190, .18));
  background: rgba(0, 0, 0, .35); color: var(--text, #f6eedf); font: 500 14px/1 var(--font-ui, system-ui, sans-serif); }
.su-select:focus, .su-input:focus { outline: 2px solid rgba(var(--accent-rgb, 242, 193, 78), .7); outline-offset: 1px; }
.su-row2 { display: grid; gap: 14px; }
.su-opt { font-weight: 600; font-size: 11px; letter-spacing: .02em; text-transform: none; opacity: .8; }
.su-choices { display: flex; flex-wrap: wrap; gap: 6px; }
/* the pills share the row evenly (a wrapped one fills its row instead of dangling) */
.su-form .su-choice { flex: 1 1 auto; justify-content: center; }
.su-choice { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2, rgba(255, 232, 190, .18)); background: rgba(255, 255, 255, .04); color: var(--text-2, #d8ccb2);
  font: 600 13px/1 var(--font-ui, system-ui, sans-serif); transition: background .15s, color .15s; }
.su-choice .ic { width: 15px; height: 15px; }
.su-choice:hover { background: rgba(255, 255, 255, .08); color: var(--text, #f6eedf); }
.su-choice.on { color: var(--ink, #1e1404); background: var(--accent, #f2c14e); border-color: transparent; }
.su-choice:focus-visible { outline: 2px solid var(--accent, #f2c14e); outline-offset: 2px; }
.su-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.su-actions .btn { flex: 1 1 180px; height: 42px; } /* the same width side by side, full width once they wrap */
.su-login { display: grid; gap: 10px; justify-items: start; padding: 22px; border-radius: var(--r, 22px);
  border: 1px solid var(--line, rgba(255, 232, 190, .1)); background: linear-gradient(180deg, var(--card-2, #17130e), var(--card, #110e0b)); }
.su-closed { padding: 18px 20px; border-radius: 16px; border: 1px dashed var(--line-2, rgba(255, 232, 190, .18)); }
.su-status { min-height: 1.3em; margin: 0; font: 600 13px/1.3 var(--font-ui, system-ui, sans-serif); color: var(--ok, #7fe0a8); }
.su-status.bad { color: var(--bad, #ff9a90); }
.su-ext { display: inline-flex; align-items: center; gap: 6px; justify-self: start; font: 600 13px/1 var(--font-ui, system-ui, sans-serif); color: var(--text-3, #b3a68c); }
.su-ext .ic { width: 14px; height: 14px; }
.su-ext:hover { color: var(--text, #f6eedf); }
@media (max-width: 980px) {
  .su-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .su-cols { grid-template-columns: minmax(0, 1fr); }
  .su-roster, .su-form { padding: 16px; }
}

/* "alt of" on the roster (js/signups.js) */
.su-alt { font-size: 12px; color: var(--text-3, #b3a68c); font-style: italic; }
.su-claim { display: grid; gap: 10px; justify-items: start; }

/* "Who are you?": claiming one's characters (js/claim.js) ---------------------- */
.cl-dialog { width: min(720px, calc(100vw - 24px)); max-height: min(86vh, 900px); padding: 0; border: 1px solid var(--line-2, rgba(255, 232, 190, .18));
  border-radius: 22px; background: #0e0c0a; color: var(--text, #f6eedf); box-shadow: 0 40px 90px rgba(0, 0, 0, .7);
  font: 500 14px/1.45 var(--font-ui, system-ui, sans-serif); overflow: hidden; }
:root[data-theme="crystal"] .cl-dialog { background: #0a0c16; }
:root[data-theme="veil"] .cl-dialog { background: #0b1220; }
.cl-dialog:focus, .cl-dialog:focus-visible { outline: none; } /* its buttons show their own focus */
.cl-dialog::backdrop { background: rgba(4, 3, 2, .72); backdrop-filter: blur(6px); }
.cl-box { display: flex; flex-direction: column; gap: 14px; max-height: min(86vh, 900px); padding: 22px 22px 18px; }
.cl-loading { min-height: 160px; justify-content: center; align-items: center; }
.cl-head { display: flex; align-items: flex-start; gap: 14px; }
.cl-mark { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 14px;
  background: rgba(var(--accent-rgb, 242, 193, 78), .14); color: var(--accent, #f2c14e); border: 1px solid rgba(var(--accent-rgb, 242, 193, 78), .35); }
.cl-mark .ic { width: 22px; height: 22px; }
.cl-titles { flex: 1; min-width: 0; }
.cl-step { margin: 0 0 4px; font: 800 11px/1.2 var(--font-ui, system-ui, sans-serif); letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent, #f2c14e); }
.cl-title { margin: 0 0 6px; font: 700 clamp(21px, 3vw, 28px)/1.1 var(--font-display, Georgia, serif); letter-spacing: .04em; text-wrap: balance; }
.cl-lead { margin: 0; color: var(--text-2, #d8ccb2); text-wrap: pretty; }
.cl-x { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line, rgba(255, 232, 190, .1));
  background: none; color: var(--text-2, #d8ccb2); cursor: pointer; }
.cl-x:hover { background: rgba(255, 255, 255, .06); }
.cl-searchbox { display: block; flex: none; }
.cl-search { width: 100%; height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2, rgba(255, 232, 190, .18));
  background: rgba(255, 255, 255, .04); color: inherit; font: inherit; }
.cl-search:focus-visible { outline: 2px solid var(--accent, #f2c14e); outline-offset: 1px; }
.cl-list { list-style: none; margin: 0; padding: 0 4px 0 0; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 6px; overflow-y: auto; min-height: 120px; }
/* one row: the class stripe, the name over its level/class line, one action pill on the right.
   Every row the same height and every pill the same width, whatever the name or the width. */
.cl-row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 10px 8px 16px; border-radius: 12px;
  border: 1px solid var(--line, rgba(255, 232, 190, .1)); background: rgba(255, 255, 255, .025); }
.cl-row::before { content: ""; position: absolute; inset: 9px auto 9px 0; width: 3px; border-radius: 3px; background: var(--cc, #8a8a8a); }
.cl-row.is-main, .cl-row.is-picked { border-color: rgba(var(--accent-rgb, 242, 193, 78), .55); background: rgba(var(--accent-rgb, 242, 193, 78), .07); }
.cl-row.is-taken { opacity: .6; }
.cl-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cl-clickable { cursor: pointer; }
.cl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 700 16px/1.25 var(--font-display, Georgia, serif); letter-spacing: .03em; color: var(--ct, #f6eedf); }
.cl-meta { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
.cl-sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--text-3, #b3a68c); font-size: 12px; line-height: 18px; }
.cl-badge { flex: none; padding: 1px 8px; border-radius: 999px; font-size: 11px; line-height: 16px; font-weight: 800; letter-spacing: .02em; }
.cl-suggest { background: var(--accent, #f2c14e); color: #1d1404; }
.cl-yours { background: rgba(255, 255, 255, .1); color: var(--text, #f6eedf); }
.cl-acts { display: flex; flex: none; gap: 6px; }
.cl-pick, .cl-state { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 118px; height: 34px; padding: 0 14px;
  border-radius: 999px; font: 700 12.5px/1 var(--font-ui, system-ui, sans-serif); white-space: nowrap; }
.cl-pick { border: 1px solid var(--line-2, rgba(255, 232, 190, .18)); background: rgba(255, 255, 255, .03); color: var(--text, #f6eedf); cursor: pointer; }
.cl-pick .ic, .cl-state .ic { width: 15px; height: 15px; }
.cl-pick:not(.on) .ic { display: none; } /* the tick shows only when it's picked */
.cl-pick:hover { background: rgba(255, 255, 255, .08); border-color: rgba(var(--accent-rgb, 242, 193, 78), .5); }
.cl-pick.on { background: var(--accent, #f2c14e); border-color: var(--accent, #f2c14e); color: #1d1404; }
.cl-pick:focus-visible { outline: 2px solid var(--accent, #f2c14e); outline-offset: 2px; }
.cl-state { border: 1px dashed var(--line-2, rgba(255, 232, 190, .18)); color: var(--text-3, #b3a68c); }
.cl-state-own { border-style: solid; border-color: rgba(var(--accent-rgb, 242, 193, 78), .45); color: var(--accent, #f2c14e);
  background: rgba(var(--accent-rgb, 242, 193, 78), .08); }
.cl-none, .cl-note { margin: 0; color: var(--text-3, #b3a68c); font-size: 13px; }
.cl-note b { color: var(--text-2, #d8ccb2); }
.cl-note a { color: var(--accent, #f2c14e); text-decoration: underline; text-underline-offset: 2px; }
.cl-notes { display: grid; gap: 4px; flex: none; }
.cl-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex: none; padding-top: 14px;
  border-top: 1px solid var(--line, rgba(255, 232, 190, .1)); }
.cl-foot .btn { min-width: 168px; }
.cl-save[disabled] { opacity: .5; cursor: not-allowed; }
.cl-status { flex: 1 0 100%; margin: 0; font-size: 13px; color: var(--text-2, #d8ccb2); }
.cl-status:empty { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } /* out of the layout, still heard */
.cl-status.bad { color: #ff9b85; }
@media (max-width: 560px) {
  .cl-box { gap: 12px; padding: 16px 14px 14px; }
  .cl-mark { display: none; } /* room for the title on one line */
  .cl-row { gap: 10px; min-height: 56px; padding: 7px 8px 7px 14px; }
  .cl-name { font-size: 15px; }
  .cl-pick, .cl-state { min-width: 108px; padding: 0 10px; }
  .cl-foot .btn { flex: 1 1 0; min-width: 0; padding: 0 12px; } /* two equal buttons side by side */
}
@media (max-width: 400px) { /* the narrowest phones: room for a whole name */
  .cl-row { gap: 8px; padding-right: 6px; }
  .cl-name { font-size: 14.5px; letter-spacing: .02em; }
  .cl-pick, .cl-state { min-width: 94px; gap: 4px; padding: 0 9px; font-size: 12px; }
  .cl-meta .cl-suggest { display: none; } /* the row is picked and lit already */
  .cl-foot .btn .ic { display: none; }
}
/* the dialog sits outside the tools page's shell (shell.css scopes .ic and .btn
   to .ncp-shell): its icons, buttons and hidden labels carry their own look */
.cl-dialog .ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cl-dialog .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cl-dialog .btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 40px; padding: 0 18px; border-radius: 999px;
  font: 700 14px/1 var(--font-ui, system-ui, sans-serif); white-space: nowrap; text-decoration: none; cursor: pointer; border: 0; }
.cl-dialog .btn-primary { color: #1d1404; background: linear-gradient(180deg, #ffe7ad, #f2c76a 55%, #e2a94e); }
.cl-dialog .btn-ghost { color: var(--text, #f6eedf); border: 1px solid var(--line-2, rgba(255, 232, 190, .18)); background: rgba(255, 255, 255, .05); }
.cl-dialog .btn-ghost:hover { background: rgba(255, 255, 255, .09); }

/* roles the picked character's class can't fill (js/site/signups.js fitRoles) */
.su-choice:disabled { opacity: .32; cursor: not-allowed; filter: grayscale(1); }
.su-choice:disabled:hover { transform: none; }
.su-role-hint { margin: 6px 0 0; }
