:root {
  --bg: #f5f6f8; --card: #fff; --text: #1e1f22; --muted: #6b6f76;
  --border: #e1e3e8; --accent: #5865f2; --ok: #1f8a4c; --err: #c0392b;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1e1f22; --card: #2b2d31; --text: #e8e9eb; --muted: #9aa0a8;
          --border: #3a3c42; --accent: #7983f5; --ok: #3fbf74; --err: #ef6f61; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, sans-serif; background: var(--bg); color: var(--text); }
header { display: flex; align-items: center; gap: 24px; padding: 12px 24px;
         background: var(--card); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
nav { display: flex; gap: 16px; flex: 1; }
nav a { color: var(--muted); text-decoration: none; }
nav a.active, nav a:hover { color: var(--accent); }
main { max-width: 1100px; margin: 0 auto; padding: 24px 16px; }
h1 { margin: 0 0 8px; font-size: 1.6rem; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
h3 { margin: 0 0 4px; font-size: 1.05rem; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.empty { color: var(--muted); padding: 24px 0; }
.status { font-size: .85rem; padding: 2px 10px; border-radius: 99px; }
.status.on { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.status.off { background: color-mix(in srgb, var(--err) 18%, transparent); color: var(--err); }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; word-break: break-word; }
.flash.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.flash.error { background: color-mix(in srgb, var(--err) 15%, transparent); color: var(--err); }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--border); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-size: .8rem; text-transform: uppercase; color: var(--muted); }
tr:last-child td { border-bottom: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: block; }
.role, .tag { display: inline-block; font-size: .75rem; padding: 1px 8px; margin: 1px 4px 1px 0;
              border-radius: 99px; background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }

.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.card.event { margin-bottom: 12px; padding: 14px 16px; }
.card.event p { margin: 4px 0; }
.narrow { max-width: 360px; margin: 40px auto; }

form label { display: block; margin-bottom: 12px; font-weight: 500; }
form label.inline { display: flex; gap: 8px; font-weight: 400; margin-bottom: 4px; }
input:not([type=radio]), textarea, select {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px; font: inherit;
  color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; }
#search { width: 260px; max-width: 100%; margin: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
fieldset { border: 1px solid var(--border); border-radius: 6px; margin: 0 0 12px; padding: 8px 12px; }
legend { color: var(--muted); font-size: .85rem; }
button { background: var(--accent); color: #fff; border: 0; border-radius: 6px; padding: 10px 18px;
         font: inherit; font-weight: 600; cursor: pointer; }
button:hover { filter: brightness(1.1); }
.sync-row { display: flex; align-items: center; gap: 12px; margin: 8px 0 16px; }
.small-btn { padding: 5px 12px; font-size: .85rem; }
button.danger { background: transparent; color: var(--err); border: 1px solid var(--err); margin-top: 10px; }
.evt-chip { display: inline-block; font-size: .75rem; padding: 1px 8px; margin: 1px 4px 1px 0; border-radius: 99px;
            border: 1px solid var(--accent); color: var(--accent); text-decoration: none; }
.event-head { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.card.event { border-left: 4px solid var(--border); }
.card.event.status-open { border-left-color: var(--ok); }
.card.event.status-full { border-left-color: #e08a1e; }
.card.event.status-closed { border-left-color: var(--err); }
.desc { white-space: pre-line; }
details summary { cursor: pointer; margin: 6px 0; }
.participants { margin: 4px 0 0; padding-left: 22px; }
.participants li { margin: 3px 0; }
.parties { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 8px; }
.party { border: 1px solid var(--border); border-radius: 8px; padding: 8px; background: var(--bg); }
.party-head { display: flex; justify-content: space-between; font-weight: 600; font-size: .85rem; margin-bottom: 6px; }
.new-party { border-style: dashed; opacity: .75; }
.spot { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 3px 6px; margin: 3px 0;
        border-radius: 6px; border: 1px dashed transparent; }
.spot-n { font-size: .7rem; color: var(--muted); width: 12px; text-align: right; flex: none; }
.spot .open { color: var(--muted); font-size: .8rem; font-style: italic; }
.chip { display: flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 99px; min-width: 0;
        background: var(--card); border: 1px solid var(--border); font-size: .85rem; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .avatar.sm { margin: 0; flex: none; }
.editable .spot { cursor: pointer; }
.editable .spot:hover { border-color: var(--border); }
.editable .chip { cursor: grab; }
.spot.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.chip.dragging { opacity: .4; }
.chip.picked { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent); }
.hint { margin: 4px 0; }
body.busy { cursor: progress; }
body.busy .parties { opacity: .6; pointer-events: none; }
.tag.admin { background: color-mix(in srgb, #e0a91e 22%, transparent); color: #c98f00; }
.leader { margin: 4px 0; }
.warn-count { display: inline-block; min-width: 24px; text-align: center; border-radius: 99px;
              padding: 0 8px; text-decoration: none; color: var(--muted); border: 1px solid var(--border); }
.warn-count.has { color: #fff; background: var(--err); border-color: var(--err); }
.card.warn { margin-bottom: 12px; padding: 14px 16px; border-left: 4px solid var(--err); }
.warn-user { display: flex; align-items: center; gap: 6px; color: var(--text); text-decoration: none; }
.warn-foot { display: flex; justify-content: space-between; align-items: center; }
.warn-foot button { margin-top: 0; }
.filter select { margin: 0; width: auto; }
.warn-num { font-size: .8rem; font-weight: 700; padding: 1px 9px; border-radius: 99px;
            background: color-mix(in srgb, var(--err) 15%, transparent); color: var(--err); white-space: nowrap; }
.warn-search { margin: 0 0 12px !important; }
.card.note-card { margin-bottom: 12px; padding: 14px 16px; border-left: 4px solid var(--accent); }
.card.note-card.warn { border-left-color: var(--err); }
.kind-badge { font-size: .8rem; font-weight: 700; padding: 1px 9px; border-radius: 99px; white-space: nowrap;
              background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.kind-badge.warn { background: color-mix(in srgb, var(--err) 15%, transparent); color: var(--err); }
.type-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.type-opt { display: flex !important; align-items: center; gap: 8px; margin: 0 !important; padding: 8px 12px;
            border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.type-opt:has(input:checked).note { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.type-opt:has(input:checked).warn { border-color: var(--err); background: color-mix(in srgb, var(--err) 12%, transparent); }
button.danger-fill { background: var(--err); }
.tabs { display: flex; gap: 6px; margin: 4px 0 12px; flex-wrap: wrap; }
.tabs a { padding: 5px 12px; border-radius: 99px; border: 1px solid var(--border); color: var(--muted);
          text-decoration: none; font-size: .9rem; }
.tabs a span { font-size: .75rem; opacity: .8; margin-left: 2px; }
.tabs a.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.popup.note .popup-num { color: var(--accent); }
.note-counts { display: flex; gap: 6px; }
.note-counts a { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: 99px;
                 text-decoration: none; font-size: .8rem; border: 1px solid var(--border); color: var(--muted); }
.note-counts a.has.note { border-color: var(--accent); color: var(--accent); }
.note-counts a.has.warn { border-color: var(--err); background: var(--err); color: #fff; }
.event-header { display: block; width: calc(100% + 32px); margin: -14px -16px 12px; max-height: 220px;
                object-fit: cover; border-radius: 8px 8px 0 0; }
.header-preview { display: block; max-width: 100%; max-height: 160px; border-radius: 6px; margin: -4px 0 12px; }
input[type=file] { padding: 6px; }
/* Events dropdown in the menu */
nav { align-items: center; }
.nav-dd { position: relative; }
.nav-dd > summary { list-style: none; cursor: pointer; color: var(--muted); user-select: none; }
.nav-dd > summary::-webkit-details-marker { display: none; }
.nav-dd > summary:hover, .nav-dd > summary.active { color: var(--accent); }
.nav-dd .caret { font-size: .75em; }
.dd-menu { position: absolute; top: calc(100% + 10px); left: -10px; z-index: 20; min-width: 160px; padding: 6px;
           background: var(--card); border: 1px solid var(--border); border-radius: 8px;
           box-shadow: 0 8px 24px rgb(0 0 0 / .25); display: flex; flex-direction: column; }
.dd-menu a { padding: 7px 10px; border-radius: 6px; color: var(--text) !important; white-space: nowrap; }
.dd-menu a:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.dd-menu a.active { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent) !important; }
/* Create page: form + live Discord preview side by side */
.create-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 24px; align-items: start; }
@media (max-width: 960px) { .create-layout { grid-template-columns: 1fr; } }
.preview-col { position: sticky; top: 16px; }
.preview-col h2 { margin-bottom: 10px; }

/* Discord look-alike (always Discord's dark colors, like the real app) */
.dc-message { display: flex; gap: 14px; padding: 14px 16px; border-radius: 10px; background: #313338; color: #dbdee1;
              font: 15px/1.375 "gg sans", "Noto Sans", "Helvetica Neue", Arial, sans-serif; }
.dc-avatar { width: 40px; height: 40px; border-radius: 50%; background: #5865f2; display: grid; place-items: center;
             font-size: 20px; flex: none; }
.dc-body { min-width: 0; flex: 1; }
.dc-author { font-weight: 600; color: #f2f3f5; margin-bottom: 4px; }
.dc-bot { font-size: 10px; font-weight: 700; background: #5865f2; color: #fff; padding: 1px 4px; border-radius: 3px;
          vertical-align: 2px; margin-left: 2px; }
.dc-time { font-size: 12px; font-weight: 400; color: #949ba4; margin-left: 4px; }
.dc-embed { background: #2b2d31; border-left: 4px solid #57f287; border-radius: 4px; padding: 10px 16px 14px 12px;
            max-width: 432px; display: grid; gap: 8px; }
.dc-title { font-weight: 700; color: #f2f3f5; font-size: 16px; word-break: break-word; }
.dc-desc { font-size: 14px; white-space: pre-line; word-break: break-word; }
.dc-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dc-field { font-size: 14px; min-width: 0; }
.dc-field.full { grid-column: 1 / -1; }
.dc-fname { font-weight: 700; color: #f2f3f5; margin-bottom: 2px; }
.dc-fvalue { word-break: break-word; }
.dc-ts { background: rgb(255 255 255 / .06); border-radius: 3px; padding: 0 2px; }
.dc-mention { background: rgb(88 101 242 / .3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; font-weight: 500; }
.dc-image { max-width: 100%; border-radius: 4px; margin-top: 4px; }
.dc-footer { font-size: 12px; color: #b5bac1; }
.dc-buttons { display: flex; gap: 8px; margin-top: 8px; }
.dc-btn { font-size: 14px; font-weight: 500; padding: 4px 14px; border-radius: 3px; color: #fff; }
.dc-btn.green { background: #248046; }
.dc-btn.grey { background: #4e5058; }
.dc-thread { margin-top: 8px; font-size: 14px; color: #f2f3f5; font-weight: 600; background: #2b2d31;
             border-radius: 4px; padding: 6px 10px; display: inline-block; max-width: 100%; overflow: hidden;
             text-overflow: ellipsis; white-space: nowrap; }
.dc-thread-sub { color: #949ba4; font-weight: 400; }
.event-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 16px; align-items: start; }
.event-list .card.event { margin-bottom: 0; }
.image-chosen { margin: -4px 0 12px; }
.image-chosen .header-preview { margin: 0 0 6px; }
.image-chosen button { margin-top: 0; }
.event-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.event-actions button { margin-top: 0; }
details.archive { margin-top: 28px; }
details.archive > summary { list-style: none; cursor: pointer; }
details.archive > summary::-webkit-details-marker { display: none; }
details.archive > summary h2 { display: inline; }
details.archive > summary::before { content: "▸ "; color: var(--muted); }
details.archive[open] > summary::before { content: "▾ "; }
.card.event.archived { opacity: .8; border-left-color: var(--border); }
.popup.notes-popup { text-align: left; width: min(560px, calc(100vw - 32px)); max-width: none; padding: 20px 22px; }
.np-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.np-head h2 { margin: 0; font-size: 1.15rem; }
.np-close { background: transparent; color: var(--muted); padding: 4px 8px; font-size: 1rem; margin: 0 !important; min-width: 0 !important; }
.np-body { max-height: 55vh; overflow-y: auto; margin: 14px 0; }
.np-item { border-left: 3px solid var(--accent); padding: 6px 0 6px 12px; margin-bottom: 10px; }
.np-item.warn { border-left-color: var(--err); }
.np-item .desc { margin: 4px 0 0; }
.np-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.np-foot { display: flex; justify-content: flex-end; }
.btn-link { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600;
            padding: 9px 16px; border-radius: 6px; }
.popup.notes-popup.warn .btn-link { background: var(--err); }
.more-cell { text-align: right; width: 1%; }
a.more-btn { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; border-radius: 6px; font-weight: 600; }
.profile { display: flex; gap: 20px; align-items: center; margin: 12px 0 24px; flex-wrap: wrap; }
.profile h1 { display: flex; align-items: center; gap: 10px; }
.profile p { margin: 4px 0; }
.avatar.xl { width: 96px; height: 96px; border-radius: 50%; }
.role-list { margin-top: 8px; }
.char-card { display: flex; justify-content: space-between; align-items: center; gap: 12px;
             margin-bottom: 10px; padding: 12px 16px; flex-wrap: wrap; }
.char-card.main { border-color: #e0a91e; box-shadow: 0 0 0 1px #e0a91e inset; }
.char-name { font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
.main-badge { font-size: .75rem; font-weight: 700; color: #c98f00; margin-left: 4px; }
.char-actions { display: flex; gap: 8px; }
.shugo-stats { align-items: center; }
.char-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.char-avatar { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none;
               background: var(--bg); border: 1px solid var(--border); }
.char-avatar.placeholder { display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; color: var(--muted); }
.char-card.main .char-avatar { border-color: #e0a91e; }
a.shugo-link { font-size: .85rem; font-weight: 600; color: var(--accent); text-decoration: none; margin-left: 2px; }
a.shugo-link:hover { text-decoration: underline; }
.shugo-stats { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.shugo-stats span { font-size: .85rem; padding: 2px 9px; border-radius: 6px; background: var(--bg); border: 1px solid var(--border); }
.shugo-stats b { color: var(--muted); font-weight: 600; margin-right: 2px; }
.char-actions button { margin-top: 0; }
.mini-event { padding: 10px 14px; margin-bottom: 8px; }
.profile-notes { margin-top: 24px; }
/* Class tag with the class's emblem tinted in its colour.
   The emblem is silver on transparent: the box is filled with the class colour,
   cut to the emblem's shape (mask), and the emblem itself is multiplied on top
   so its engraved details stay visible. */
.class-tag.tinted { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px 1px 4px;
                    color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
                    border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.class-icon { display: inline-block; width: 20px; height: 21px; flex: none; isolation: isolate;
              background: var(--c);
              -webkit-mask: var(--img) center / contain no-repeat; mask: var(--img) center / contain no-repeat; }
.class-icon img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply;
                  filter: brightness(1.15) contrast(1.1); }
/* Event sign-up board: parties + Bench + Late */
.signup-board .parties { margin-top: 8px; }
.signup-group { margin-top: 10px; padding: 8px; border: 1px dashed var(--border); border-radius: 8px;
                display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--bg); }
.signup-group .party-head { width: 100%; margin-bottom: 2px; }
.signup-group .open { color: var(--muted); font-size: .8rem; font-style: italic; }
.editable .bench-zone { cursor: pointer; }
.bench-zone.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.late-zone { border-color: color-mix(in srgb, #e0a91e 50%, var(--border)); }
.chip .pname { font-weight: 600; }
.chip .class-icon { flex: none; }
.late-badge { font-size: .72rem; font-weight: 700; color: #c98f00; white-space: nowrap; }
.leader { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.class-icon.unknown { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); -webkit-mask: none; mask: none; }
.char-inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.char-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.name-cell { display: flex; align-items: center; gap: 10px; line-height: 1.3; }
.class-tag { display: inline-block; font-size: .8rem; padding: 1px 9px; margin: 1px 4px 1px 0; border-radius: 6px;
             background: color-mix(in srgb, #e0a91e 18%, transparent); color: #c98f00; font-weight: 600; }
.combo { position: relative; margin-bottom: 4px; }
.combo-list { position: absolute; z-index: 10; left: 0; right: 0; top: 100%; margin: 2px 0 0; padding: 4px 0;
              list-style: none; max-height: 260px; overflow-y: auto; background: var(--card);
              border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 6px 20px rgb(0 0 0 / .2); }
.combo-list li { padding: 6px 10px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.combo-list li:hover, .combo-list li.active { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.combo-list li.none { cursor: default; }
.popup { border: 0; border-radius: 12px; padding: 28px 32px; text-align: center; max-width: 360px;
         background: var(--card); color: var(--text); box-shadow: 0 20px 60px rgb(0 0 0 / .4); }
.popup::backdrop { background: rgb(0 0 0 / .5); }
.popup h2 { margin: 6px 0 8px; }
.popup-num { font-size: 2.6rem; font-weight: 800; color: var(--err); line-height: 1; }
.popup button { margin-top: 8px; min-width: 100px; }
.me { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.me .avatar.sm { width: 26px; height: 26px; margin: 0; }
button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.login { text-align: center; }
.discord-btn { display: inline-flex; align-items: center; gap: 10px; margin: 12px 0 4px; padding: 12px 22px;
               background: #5865f2; color: #fff; border-radius: 8px; font-weight: 600; text-decoration: none; }
.discord-btn:hover { background: #4752c4; }
.avatar.sm { width: 20px; height: 20px; display: inline-block; vertical-align: middle; margin-right: 4px; }

/* Event list (Ongoing / Archived): one event per row, 450px wide */
.event-list { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.event-list .card.event { margin: 0; width: 950px; max-width: 100%; }
.event-list .event-header { max-height: 260px; }

/* Sign up from the website */
.signup-panel { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
                background: var(--bg); display: flex; flex-direction: column; gap: 8px; }
.sp-status { font-size: .9rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sp-char { margin: 0 !important; font-size: .85rem; }
.sp-char select { margin-top: 4px; }
.sp-buttons { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sp-buttons button { margin: 0; }
.sp-buttons button[disabled] { opacity: .45; cursor: not-allowed; }
.sp-late { display: inline-flex; gap: 4px; align-items: center; }
.sp-late select { width: auto; margin: 0; padding: 4px 6px; font-size: .85rem; }

/* "Take part" button + sign-up popup */
.take-part { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
             margin: 10px 0; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.take-part button { margin: 0; }
.popup.signup-dialog { text-align: left; width: min(440px, calc(100vw - 32px)); max-width: none; padding: 20px 22px; }
.signup-dialog h2 { margin: 0; font-size: 1.15rem; }
.signup-dialog p { margin: 6px 0; }
.signup-form { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.signup-form label { margin: 0; }
.signup-options { display: grid; gap: 8px; }
.opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; margin: 0;
       padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg);
       color: var(--text); text-align: left; font-weight: 400; cursor: pointer; }
button.opt:hover { border-color: var(--accent); filter: none; }
.opt-join { border-color: color-mix(in srgb, var(--ok) 60%, var(--border)); }
.opt[disabled] { opacity: .45; cursor: not-allowed; }
.opt-title { font-weight: 700; }
.opt-sub { font-size: .8rem; color: var(--muted); }
.opt-late { cursor: default; }
.sp-leave { align-self: flex-start; margin: 0; }

/* Events that were deleted (kept in Archived) */
.tag.deleted-tag { background: color-mix(in srgb, var(--err) 16%, transparent); color: var(--err); }
.deleted-note { color: var(--err); }
.event-list .card.event.deleted { border-left-color: var(--err); }

/* Side-by-side columns keep their own height (no stretched empty boxes) */
.grid { align-items: start; }

/* Member profile: every role tag is the same size (class roles keep their icon) */
.role-list { display: flex; flex-wrap: wrap; gap: 6px; }
.role-list .role, .role-list .class-tag {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  width: 128px; height: 28px; margin: 0; padding: 0 8px; box-sizing: border-box;
  border-radius: 8px; font-size: .8rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.role-list .role { border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.role-list .class-tag .class-icon { width: 16px !important; height: 17px !important; }

/* Sign-up history page */
.history-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 14px; }
.history-filters select, .history-filters input { width: auto; margin: 0; }
.history-filters input { flex: 1; min-width: 160px; }
td.nowrap { white-space: nowrap; }
.hist-badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.hist-badge.join { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.hist-badge.leave { background: color-mix(in srgb, var(--err) 18%, transparent); color: var(--err); }
.hist-badge.status, .hist-badge.switch { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.hist-badge.moved { background: color-mix(in srgb, #e0a91e 22%, transparent); color: #c98f00; }

/* Characters page: both column headings above their cards, so the columns line up */
.add-char-card form { margin: 0; }
.add-char-card button { margin-top: 4px; }

/* Participation history */
.hist-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.hist-event { max-width: 720px; margin: 0 auto 14px; }
.hist-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.hist-table td { padding: 6px 4px; border-top: 1px solid var(--border); white-space: normal; }
.hist-table td.nowrap { white-space: nowrap; text-align: right; }

/* History: kind tabs + member summary */
.kind-tabs { margin: 0; }
.hist-summary { max-width: 720px; margin: 0 auto 16px; }
.hist-summary h2 { margin: 0; }
.summary-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px; }
@media (max-width: 600px) { .summary-grid { grid-template-columns: repeat(2, 1fr); } }
.sum-box { display: flex; flex-direction: column; align-items: center; padding: 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); }
.sum-num { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.sum-label { font-size: .78rem; color: var(--muted); text-align: center; }
.sum-box.ok .sum-num { color: var(--ok); }
.sum-box.bench .sum-num { color: #c98f00; }
.sum-box.late .sum-num { color: var(--accent); }

/* Absent marks */
.chip.absent { opacity: .6; border-color: var(--err); }
.chip.absent .pname { text-decoration: line-through; }
.absent-badge { font-size: .72rem; font-weight: 700; color: var(--err); white-space: nowrap; }
.absent-btn { margin: 0 0 0 auto; padding: 0 5px; min-width: 0; font-size: .75rem; line-height: 1.4; background: transparent; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; flex: none; }
.absent-btn:hover { color: var(--err); border-color: var(--err); filter: none; }
.hist-badge.absent { background: color-mix(in srgb, var(--err) 18%, transparent); color: var(--err); }
.sum-box.absent .sum-num { color: var(--err); }

/* Event cards: two parties per row (new-party box included) */
.event-list .card.event .parties { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .event-list .card.event .parties { grid-template-columns: 1fr; } }

/* Sign-up popup: pick an option card, then Confirm */
.signup-options .opt { position: relative; cursor: pointer; padding-left: 38px; }
.signup-options .opt input[type=radio] { position: absolute; left: 12px; top: 13px; width: 16px; height: 16px;
                                         margin: 0; accent-color: var(--accent); }
.signup-options .opt:has(input:checked) { border-color: var(--accent);
                                          background: color-mix(in srgb, var(--accent) 12%, var(--bg)); }
.signup-options .opt.disabled { opacity: .45; cursor: not-allowed; }
.signup-options .late-select { width: auto; margin: 6px 0 0; padding: 4px 8px; font-size: .85rem; }
.sp-confirm { width: 100%; margin-top: 4px; }
.signup-dialog .sp-leave { margin-top: 10px; }

/* History: icon, character, @discord and crown on one centred line */
.hist-person { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hist-person .class-icon { flex: none; }

/* =====================================================================
   InSoDia theme: dark with crimson neon, based on the guild logo.
   Defined last so it overrides the default light/dark colours above.
   ===================================================================== */
:root, :root[data-theme] {
  --bg: #0a0608;
  --card: #140b0e;
  --text: #f3e8ea;
  --muted: #a38d93;
  --border: #3b1820;
  --accent: #e3243f;          /* crimson from the logo */
  --accent-glow: rgb(227 36 63 / .45);
  --ok: #3fbf74;
  --err: #ff5a5f;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #0a0608; --card: #140b0e; --text: #f3e8ea; --muted: #a38d93; --border: #3b1820; }
}

body {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgb(227 36 63 / .18), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 110%, rgb(227 36 63 / .08), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
h1, h2, .brand-name { font-family: "Cinzel", Georgia, serif; letter-spacing: .04em; }
h1 { text-shadow: 0 0 18px var(--accent-glow); }

/* Header */
header { background: rgb(14 7 9 / .92); border-bottom: 1px solid var(--border);
         box-shadow: 0 1px 0 rgb(227 36 63 / .25), 0 6px 24px rgb(227 36 63 / .08);
         backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { height: 38px; width: auto; filter: drop-shadow(0 0 8px var(--accent-glow)); }
.brand-name { font-weight: 700; font-size: 1.1rem; color: #ff4d64; text-shadow: 0 0 10px var(--accent-glow); }
nav a, .nav-dd > summary { color: var(--muted); }
nav a.active, nav a:hover, .nav-dd > summary.active, .nav-dd > summary:hover { color: #ff4d64; text-shadow: 0 0 10px var(--accent-glow); }

/* Cards */
.card { background: linear-gradient(180deg, rgb(255 255 255 / .02), transparent 40%), var(--card);
        border-color: var(--border); box-shadow: 0 0 0 1px rgb(227 36 63 / .04), 0 8px 30px rgb(0 0 0 / .45); }
.card:hover { border-color: rgb(227 36 63 / .35); }
.table-wrap { background: var(--card); border-color: var(--border); }
th { color: #c8707f; }
tr:hover td { background: rgb(227 36 63 / .04); }

/* Buttons */
button, a.more-btn, a.btn-link, .discord-btn {
  background: linear-gradient(180deg, #ef3550, #b5132c); color: #fff;
  box-shadow: 0 0 0 1px rgb(255 80 100 / .25), 0 0 14px var(--accent-glow);
}
button:hover, a.more-btn:hover, a.btn-link:hover { filter: brightness(1.12); box-shadow: 0 0 0 1px rgb(255 80 100 / .45), 0 0 22px var(--accent-glow); }
button.ghost, .small-btn.ghost, button.danger, .np-close, .absent-btn, .opt, button.opt {
  background: transparent; box-shadow: none;
}
button.danger { color: var(--err); border: 1px solid var(--err); }
button.ghost { color: var(--muted); border: 1px solid var(--border); }
.status.on { background: rgb(63 191 116 / .14); }

/* Inputs */
input:not([type=radio]):not([type=checkbox]), textarea, select {
  background: #0d0709; border-color: var(--border); color: var(--text);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(227 36 63 / .2); }

/* Tags, pills, tabs */
.role, .tag { background: rgb(227 36 63 / .12); color: #ff8094; }
.role-list .role { border-color: rgb(227 36 63 / .35); }
.tabs a.active { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
.count-pill, .shugo-stats span, .party, .signup-group, .take-part, .signup-panel, .sum-box { background: #0d0709; }
.dd-menu { background: #140b0e; border-color: var(--border); box-shadow: 0 10px 30px rgb(0 0 0 / .6), 0 0 18px rgb(227 36 63 / .12); }

/* Popups */
.popup, dialog { background: var(--card); border: 1px solid var(--border);
                 box-shadow: 0 20px 60px rgb(0 0 0 / .7), 0 0 30px rgb(227 36 63 / .15); }
.popup::backdrop, dialog::backdrop { background: rgb(5 2 3 / .75); }

/* Login page */
.login .login-logo { width: 140px; height: auto; margin: 4px auto 8px; display: block;
                     filter: drop-shadow(0 0 18px var(--accent-glow)); }
.discord-btn { background: linear-gradient(180deg, #ef3550, #b5132c); }

/* Line icons that replace emoji (static/icons.js) */
.ic { display: inline-flex; align-items: center; justify-content: center; width: 1.05em; height: 1.05em;
      vertical-align: -0.15em; flex: none; }
.ic svg { width: 100%; height: 100%; }
.ic-accent  { color: #ff4d64; filter: drop-shadow(0 0 4px rgb(227 36 63 / .45)); }
.ic-danger  { color: var(--err); }
.ic-ok      { color: var(--ok); }
.ic-gold    { color: #e8b33a; filter: drop-shadow(0 0 4px rgb(232 179 58 / .35)); }
.ic-warn    { color: #ff6b4a; }
.ic-note    { color: #ff8094; }
.ic-bench   { color: #d9a441; }
.ic-late    { color: #f0a35e; }
.ic-muted   { color: var(--muted); }
.ic-dot-ok     { color: var(--ok); }
.ic-dot-warn   { color: #f0a35e; }
.ic-dot-danger { color: var(--err); }
.ic-dot-muted  { color: var(--muted); }
button .ic, a .ic { color: inherit; filter: none; }

/* Join legion */
.login-or { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; color: var(--muted); font-size: .8rem; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.join-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 8px;
            text-decoration: none; font-weight: 600; color: #ff8094; border: 1px solid rgb(227 36 63 / .55);
            background: rgb(227 36 63 / .08); box-shadow: 0 0 12px rgb(227 36 63 / .15); }
.join-btn:hover { background: rgb(227 36 63 / .16); color: #fff; }
.apply-card { max-width: 520px; text-align: center; }
.apply-form { text-align: left; display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.apply-form button { margin-top: 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------------------------------------------------------------------
   Navbar, styled after the logo: black with a crimson neon ring,
   engraved serif lettering and glowing accents.
   --------------------------------------------------------------------- */
header {
  padding: 10px 28px;
  gap: 28px;
  background:
    radial-gradient(ellipse 40% 140% at 8% 50%, rgb(227 36 63 / .22), transparent 70%),
    linear-gradient(180deg, #1a0a0f 0%, #0c0507 100%);
  border-bottom: 0;
  box-shadow: 0 10px 30px rgb(0 0 0 / .55);
}
/* glowing neon line along the bottom, brightest in the middle like the logo ring */
header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #7a0f20 15%, #ff2a4a 50%, #7a0f20 85%, transparent);
  box-shadow: 0 0 12px 1px rgb(255 42 74 / .55);
}
.brand img {
  height: 46px; border-radius: 50%;
  box-shadow: 0 0 0 1px rgb(255 42 74 / .5), 0 0 18px rgb(255 42 74 / .45);
}
.brand-name {
  font-family: "Cinzel", Georgia, serif; font-size: 1.35rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #ff3c58;
  text-shadow: 0 0 6px rgb(255 42 74 / .8), 0 0 18px rgb(255 42 74 / .45);
}

/* menu items: small engraved capitals, glow + underline on hover/active */
nav { gap: 6px; }
nav > a, .nav-dd > summary {
  position: relative; padding: 8px 14px; border-radius: 6px;
  font-family: "Cinzel", Georgia, serif; font-size: .82rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: #b99aa1;
  transition: color .15s, background .15s, text-shadow .15s;
}
nav > a::after, .nav-dd > summary::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; border-radius: 2px;
  background: #ff2a4a; box-shadow: 0 0 8px #ff2a4a; transform: scaleX(0); transition: transform .2s;
}
nav > a:hover, .nav-dd > summary:hover { color: #ffd6dc; background: rgb(255 42 74 / .07); text-shadow: 0 0 8px rgb(255 42 74 / .6); }
nav > a.active, .nav-dd > summary.active { color: #fff; text-shadow: 0 0 10px rgb(255 42 74 / .8); }
nav > a:hover::after, nav > a.active::after,
.nav-dd > summary:hover::after, .nav-dd > summary.active::after { transform: scaleX(1); }
/* small diamond separators between items, like the logo's engraving */
nav > a + a::before, nav > .nav-dd + a::before, nav > a + .nav-dd::before {
  content: "◆"; position: absolute; left: -6px; top: 50%; transform: translateY(-50%);
  font-size: .45rem; color: rgb(255 42 74 / .45); text-shadow: none;
}
nav > .nav-dd { position: relative; }
.nav-dd .caret { color: #ff3c58; }

/* dropdown in the same style */
.dd-menu { top: calc(100% + 12px); border: 1px solid rgb(255 42 74 / .35); border-top: 2px solid #ff2a4a;
           background: linear-gradient(180deg, #1a0a0f, #0e0608); }
.dd-menu a { font-family: inherit; text-transform: none; letter-spacing: normal; font-weight: 500; }

/* right side: bot status + user */
.status { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; border: 1px solid currentColor; }
.me { padding: 4px 6px 4px 4px; border-radius: 99px; background: rgb(255 255 255 / .03);
      border: 1px solid rgb(255 42 74 / .25); }
.me .avatar.sm { box-shadow: 0 0 0 1px rgb(255 42 74 / .6); }
.me .small-btn.ghost { border-color: rgb(255 42 74 / .35); color: #ffb3bf; }
.me .small-btn.ghost:hover { color: #fff; background: rgb(255 42 74 / .15); }

@media (max-width: 760px) {
  header { padding: 8px 14px; gap: 10px; }
  .brand-name { font-size: 1.05rem; }
  nav > a, .nav-dd > summary { padding: 6px 8px; font-size: .72rem; letter-spacing: .08em; }
  nav > a + a::before, nav > .nav-dd + a::before, nav > a + .nav-dd::before { display: none; }
}

/* No background box behind menu items on hover: just the glow + underline */
nav > a:hover, .nav-dd > summary:hover { background: transparent; }

/* Footer, matching the navbar (neon line on top instead of the bottom) */
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; }
.site-footer {
  position: relative; margin-top: 48px; padding: 22px 28px;
  background:
    radial-gradient(ellipse 40% 140% at 8% 50%, rgb(227 36 63 / .18), transparent 70%),
    linear-gradient(0deg, #1a0a0f 0%, #0c0507 100%);
  box-shadow: 0 -10px 30px rgb(0 0 0 / .45);
}
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #7a0f20 15%, #ff2a4a 50%, #7a0f20 85%, transparent);
  box-shadow: 0 0 12px 1px rgb(255 42 74 / .55);
}
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-brand img { height: 34px; }
.footer-brand .brand-name { font-size: 1.05rem; }
.footer-tag { font-family: "Cinzel", Georgia, serif; font-size: .72rem; letter-spacing: .16em;
              text-transform: uppercase; color: #8f737a; }
.footer-links { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.footer-links a {
  position: relative; padding: 6px 12px; text-decoration: none;
  font-family: "Cinzel", Georgia, serif; font-size: .72rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: #b99aa1; transition: color .15s, text-shadow .15s;
}
.footer-links a + a::before {
  content: "◆"; position: absolute; left: -4px; top: 50%; transform: translateY(-50%);
  font-size: .42rem; color: rgb(255 42 74 / .45);
}
.footer-links a:hover { color: #fff; text-shadow: 0 0 10px rgb(255 42 74 / .8); }
@media (max-width: 760px) {
  .site-footer { padding: 18px 14px; }
  .footer-links { margin-left: 0; }
}

/* Slimmer footer */
.site-footer { margin-top: 32px; padding: 10px 24px; }
.footer-inner { gap: 12px; }
.footer-brand img { height: 24px; }
.footer-brand .brand-name { font-size: .85rem; letter-spacing: .1em; }
.footer-tag { font-size: .62rem; }
.footer-links a { padding: 4px 9px; font-size: .64rem; }
@media (max-width: 760px) { .site-footer { padding: 8px 14px; } }

/* Join legion: who is applying */
.applicant-chip { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 4px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 99px; background: #0d0709; }
.applicant-chip .avatar.sm { width: 24px; height: 24px; margin: 0; border-radius: 50%; }

/* Login: Join legion + Join as guest side by side */
.join-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.join-btn.guest { color: #c9b3b8; border-color: rgb(255 255 255 / .18); background: rgb(255 255 255 / .03); box-shadow: none; }
.join-btn.guest:hover { color: #fff; border-color: rgb(227 36 63 / .55); }

/* High-res logo: the image carries its own neon glow, so no CSS ring around it */
.brand img { height: 54px; border-radius: 0; box-shadow: none; filter: none; margin: -6px -4px; }
.footer-brand img { height: 34px; margin: -5px -3px; }
.login .login-logo { width: 220px; filter: none; margin: -10px auto 0; }

/* Notes page: both headings above their content, cards start level with the tabs */
.add-note-card form { margin: 0; }
.add-note-card .type-pick { margin-top: 0; }
.grid > section > .toolbar:first-child h2 { margin: 0 0 12px; }

/* User pill in the header: Log out sits neatly inside the rounded border */
.me { padding: 3px; gap: 8px; align-items: center; border-radius: 99px; }
.me .avatar.sm { margin-left: 2px; }
.me .tag { margin: 0; }
.me .small-btn.ghost { margin: 0; padding: 4px 12px; border-radius: 99px; line-height: 1.3; }

/* Calmer buttons: flat deep crimson, thin border, glow only on hover */
button, a.more-btn, a.btn-link {
  background: #a3142b;
  border: 1px solid #c4223b;
  box-shadow: none;
  color: #fbe9ec;
  font-weight: 600;
  letter-spacing: .02em;
  border-radius: 6px;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
button:hover, a.more-btn:hover, a.btn-link:hover {
  background: #b81a33; border-color: #e3364f; filter: none;
  box-shadow: 0 0 10px rgb(227 36 63 / .3);
}
button:active { background: #8e1025; }
/* keep the outline-style buttons outline-style */
button.ghost, .small-btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--muted); }
button.danger, .small-btn.danger { background: transparent; border: 1px solid var(--err); color: var(--err); }
button.danger:hover { background: rgb(255 90 95 / .1); box-shadow: none; }
button.opt, .opt, .np-close, .absent-btn { box-shadow: none; }
.np-close { background: transparent; border: 0; }
.absent-btn { background: transparent; }

/* Neon glow behind the main buttons (like the logo's ring); stronger on hover */
button:not(.ghost):not(.danger):not(.opt):not(.np-close):not(.absent-btn),
a.more-btn, a.btn-link, .discord-btn {
  box-shadow: 0 0 0 1px rgb(255 42 74 / .35), 0 0 14px rgb(255 42 74 / .35), 0 0 32px rgb(255 42 74 / .15);
}
button:not(.ghost):not(.danger):not(.opt):not(.np-close):not(.absent-btn):hover,
a.more-btn:hover, a.btn-link:hover, .discord-btn:hover {
  box-shadow: 0 0 0 1px rgb(255 42 74 / .6), 0 0 18px rgb(255 42 74 / .55), 0 0 44px rgb(255 42 74 / .25);
}
button[disabled] { box-shadow: none !important; }

/* Main character card (Characters + More): crimson neon instead of the gold border */
.char-card.main {
  border-color: rgb(255 42 74 / .7);
  box-shadow: 0 0 0 1px rgb(255 42 74 / .45), 0 0 16px rgb(255 42 74 / .35), 0 0 36px rgb(255 42 74 / .15);
}
.char-card.main .char-avatar { border-color: rgb(255 42 74 / .7); box-shadow: 0 0 10px rgb(255 42 74 / .35); }

/* Council actions on the Members list */
.council-cell { white-space: nowrap; width: 1%; }
.council-cell form { display: inline-block; margin: 0 0 0 4px; }
.council-cell button { margin: 0; padding: 4px 10px; }

/* Council actions on a member profile */
.profile { position: relative; }
.profile-actions { margin-left: auto; align-self: flex-start; display: flex; gap: 6px; }
.profile-actions form { margin: 0; }
.profile-actions button { margin: 0; }

/* Members list: equal gaps between More, Break and Kick */
.more-cell { padding-right: 0; }
.council-cell { padding-left: 0; font-size: 0; }
.council-cell form { margin: 0 0 0 6px; }

/* EN | PL language switch */
.lang-switch { display: flex; gap: 2px; padding: 2px; border: 1px solid rgb(255 42 74 / .3); border-radius: 99px; margin-left: 6px; }
header > .lang-switch:only-of-type { margin-left: auto; }
.lang-switch a { padding: 2px 9px; border-radius: 99px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-decoration: none; color: #b99aa1; }
.lang-switch a.active { background: #a3142b; color: #fff; box-shadow: 0 0 8px rgb(255 42 74 / .45); }
.lang-switch a:not(.active):hover { color: #fff; }
.party-head .ph-label{display:inline-flex;align-items:center;gap:6px}
.council-cell{text-align:right}
.council-cell{padding-right:0;padding-left:0}.more-cell{width:1%;white-space:nowrap;padding-left:6px!important;padding-right:10px}
/* Event lines: crimson shades everywhere (match the Discord embeds) */
.card.event.status-open { border-left-color: #e3243f; }
.card.event.status-full { border-left-color: #ff5c6e; }
.card.event.status-closed { border-left-color: #8c1428; }
.card.event.archived, .card.event.status-ended { border-left-color: #5a2830; }
.dc-embed { border-left-color: #e3243f; }
.editable .late-zone{cursor:pointer}.late-zone.over{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,transparent)}
/* Text logo (no image) */
header .brand-name { font-size: 1.35rem; letter-spacing: .12em; text-transform: uppercase; }
.footer-brand .brand-name { letter-spacing: .12em; text-transform: uppercase; }
.login .login-logo.brand-name { width: auto; display: block; margin: 6px auto 10px; text-align: center;
  font-size: 2.4rem; letter-spacing: .14em; text-transform: uppercase; filter: none; }
/* Outline (ghost) buttons: same neon glow on hover as the others */
button.ghost:hover, .small-btn.ghost:hover {
  color: #fff; border-color: rgb(255 80 100 / .6); background: rgb(255 42 74 / .1);
  box-shadow: 0 0 0 1px rgb(255 80 100 / .45), 0 0 18px var(--accent-glow);
}
/* Same neon hover glow on every clickable pill / button */
.note-counts a, .tabs a, .lang-switch a, .small-btn, .join-btn, .absent-btn, .opt, button.opt,
.profile-actions button, .council-cell button, .editable .chip {
  transition: box-shadow .15s, background .15s, color .15s, border-color .15s;
}
.note-counts a:hover, .tabs a:hover, .lang-switch a:hover, .small-btn:hover, .join-btn:hover,
.absent-btn:hover, .opt:hover, button.opt:hover, button.danger:hover,
.small-btn.danger:hover, .editable .chip:hover {
  box-shadow: 0 0 0 1px rgb(255 80 100 / .45), 0 0 18px var(--accent-glow);
  filter: none;
}
.note-counts a:hover { color: #fff; border-color: rgb(255 80 100 / .6); }
.note-counts a.has.warn:hover { background: #ff5a6a; }
.discord-btn:hover { background: linear-gradient(180deg, #ef3550, #b5132c); color: #fff; filter: none; }
/* Events dropdown: glow instead of a color change; the current page keeps the glow */
.dd-menu a { transition: text-shadow .15s, color .15s; }
.dd-menu a:hover, .dd-menu a.active {
  background: transparent; box-shadow: none; color: #fff !important;
  text-shadow: 0 0 4px rgb(255 42 74), 0 0 10px rgb(255 42 74), 0 0 20px rgb(255 42 74), 0 0 36px rgb(255 42 74 / .8);
}
/* Navbar: same strong neon text glow on hover and for the current page */
header nav a:not(.dd-menu a), .nav-dd > summary { transition: text-shadow .15s, color .15s; }
header nav > a.active, header nav > a:hover, .nav-dd > summary.active, .nav-dd > summary:hover {
  color: #fff;
  text-shadow: 0 0 4px rgb(255 42 74), 0 0 10px rgb(255 42 74), 0 0 20px rgb(255 42 74), 0 0 36px rgb(255 42 74 / .8);
}
.cpgs { font-size: .72rem; font-weight: 600; color: #ffb3bf; background: rgb(255 42 74 / .12);
  border: 1px solid rgb(255 42 74 / .3); border-radius: 99px; padding: 0 7px; white-space: nowrap; }
/* Styled alert / confirm / choose popups (ui-dialogs.js) */
.popup.ui-dialog { width: min(420px, calc(100vw - 32px)); max-width: none; padding: 22px 24px; text-align: center;
  background: #140b0e; color: var(--text); border: 1px solid rgb(255 42 74 / .4);
  box-shadow: 0 0 0 1px rgb(255 42 74 / .25), 0 0 30px rgb(255 42 74 / .25), 0 20px 50px rgb(0 0 0 / .6); }
.popup.ui-dialog::backdrop { background: rgb(0 0 0 / .6); backdrop-filter: blur(2px); }
.ui-dialog-text { margin: 4px 0 18px; white-space: pre-line; line-height: 1.45; }
.ui-dialog-buttons { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.ui-dialog-buttons button { margin: 0; min-width: 90px; }

/* busy spinner popup */
.popup.ui-busy { width: fit-content !important; min-width: 0 !important; max-width: calc(100vw - 32px) !important; margin: auto !important; padding: 14px 20px; display: flex; align-items: center; gap: 12px; }
.ui-busy .ui-dialog-text { margin: 0; font-size: .92rem; opacity: .85; }
.ui-spinner { width: 22px; height: 22px; flex: none; border-radius: 50%;
  border: 3px solid rgb(255 255 255 / .12); border-top-color: var(--accent, #e3243f);
  box-shadow: 0 0 10px var(--accent-glow, rgb(227 36 63 / .45)); animation: ui-spin .8s linear infinite; }
@keyframes ui-spin { to { transform: rotate(360deg); } }
.popup.ui-busy:focus, .popup.ui-busy:focus-visible { outline: none; }
.char-role { font-style: italic; font-size: .85em; opacity: .7; }
