@font-face { font-family: 'Cinzel'; font-weight: 600; font-display: swap; src: url(/fonts/cinzel-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Cinzel'; font-weight: 800; font-display: swap; src: url(/fonts/cinzel-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'Grenze Gotisch'; font-weight: 700; font-display: swap; src: url(/fonts/grenze-gotisch-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Grenze Gotisch'; font-weight: 900; font-display: swap; src: url(/fonts/grenze-gotisch-latin-900-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url(/fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url(/fonts/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url(/fonts/inter-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url(/fonts/inter-latin-700-normal.woff2) format('woff2'); }

:root {
  --bg: #120809;
  --panel: #1c0d0e;
  --field: #0e0607;
  --gold: #d4af37;
  --gold-soft: rgba(212, 175, 55, 0.4);
  --gold-faint: rgba(212, 175, 55, 0.22);
  --ember: #c42b1c;
  --blood: #8e1b12;
  --text: #f2e2c4;
  --muted: #c9b8a0;
  --ok: #6fbf73;
  --display: 'Grenze Gotisch', Georgia, serif;
  --caps: 'Cinzel', Georgia, serif;
  --body: 'Inter', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.5; }
a { color: var(--gold); }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Header / footer */
.site-header { border-bottom: 1px solid var(--gold-soft); background: #0d0506; }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; min-height: 64px; }
.brand { font-family: var(--caps); font-weight: 800; font-size: 20px; letter-spacing: 2px; color: var(--gold); text-decoration: none; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; font-size: 15px; }
nav a { color: var(--text); text-decoration: none; padding: 10px 0; }
nav a[aria-current="page"], nav a:hover { color: var(--gold); }
nav .who { color: var(--muted); }
/* Header: crest, glowing nav and gold rule with a diamond under the current page */
.site-header { position: relative; border-bottom: 0; background: linear-gradient(180deg, #1a0a0b, #0d0506); }
.site-header::after { content: ''; display: block; height: 2px; background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.15) 8%, rgba(212, 175, 55, 0.55) 50%, rgba(212, 175, 55, 0.15) 92%, transparent); }
.site-header .header-row { min-height: 68px; }
.site-header .brand { display: inline-flex; align-items: center; gap: 12px; text-transform: uppercase; letter-spacing: 3px; text-shadow: 0 0 14px rgba(212, 175, 55, 0.45); }
.brand-crest { width: 36px; height: 36px; flex-shrink: 0; }
.site-header nav { gap: 0 30px; font-family: var(--caps); font-weight: 600; font-size: 15px; letter-spacing: 1px; }
.site-header nav a { position: relative; padding: 24px 0; }
.site-header nav a:hover { color: #f0c85a; text-shadow: 0 0 10px rgba(240, 200, 90, 0.5); }
.site-header nav a[aria-current="page"] { color: #f0c85a; text-shadow: 0 0 12px rgba(240, 200, 90, 0.85), 0 0 24px rgba(212, 175, 55, 0.5); }
.site-header nav a[aria-current="page"]::after { content: ''; position: absolute; left: 50%; bottom: -11px; width: 120px; height: 20px; transform: translateX(-50%); pointer-events: none; filter: drop-shadow(0 0 6px rgba(240, 200, 90, 0.8)); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 20'%3E%3Cpath d='M0 10H48M72 10H120' stroke='%23f0c85a' stroke-width='3' stroke-linecap='round'/%3E%3Crect x='54' y='4' width='12' height='12' transform='rotate(45 60 10)' fill='%23120809' stroke='%23f0c85a' stroke-width='2'/%3E%3Crect x='57' y='7' width='6' height='6' transform='rotate(45 60 10)' fill='%23f0c85a'/%3E%3C/svg%3E") no-repeat center / 100% 100%; }
.site-header nav .who { color: var(--muted); }
.nav-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--gold-soft); border-radius: 4px; background: transparent; cursor: pointer; }
.nav-toggle:hover { border-color: var(--gold); }
@media (max-width: 1100px) {
  .site-header .header-row { flex-wrap: wrap; flex-direction: row; gap: 0; padding-top: 8px; padding-bottom: 8px; }
  .site-header .brand { font-size: 16px; letter-spacing: 2px; }
  .nav-toggle { display: inline-flex; }
  .site-header nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; margin: 8px 0 4px; border: 1px solid var(--gold-soft); background: #0d0506; font-size: 16px; }
  .site-header.nav-open nav { display: flex; }
  .site-header nav a, .site-header nav .who { display: flex; align-items: center; min-height: 52px; padding: 0 18px; border-bottom: 1px solid var(--gold-faint); }
  .site-header nav > :last-child { border-bottom: 0; }
  .site-header nav a[aria-current="page"] { background: rgba(142, 27, 18, 0.28); }
  .site-header nav a[aria-current="page"]::after { content: none; }
}
/* Home hero: big name, motto, moonlit ravens backdrop */
.home-hero { position: relative; overflow: hidden; background: #120809 url(/bg/hero.jpg) 78% 30% / cover no-repeat; }
.home-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #120809 6%, rgba(18, 8, 9, 0.78) 38%, rgba(18, 8, 9, 0.08) 100%); }
.home-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18, 8, 9, 0) 55%, var(--bg) 100%); }
.home-hero .wrap { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; padding-top: 56px; padding-bottom: 96px; }
.home-hero h1 { margin: 0; font-size: clamp(54px, 9vw, 96px); line-height: 0.95; text-shadow: 0 0 22px rgba(190, 30, 20, 0.65), 0 0 48px rgba(190, 30, 20, 0.35); }
.hero-motto { margin: 0; font-family: var(--caps); font-weight: 600; font-size: clamp(15px, 2.2vw, 20px); letter-spacing: 4px; text-transform: uppercase; color: var(--gold); text-shadow: 0 0 14px rgba(212, 175, 55, 0.45); }
.home-hero .lead { margin: 4px 0 0; max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.hero-actions .btn-primary { box-shadow: 0 0 18px rgba(190, 30, 20, 0.45); }
.home-hero + main > .launch:first-child { position: relative; margin-top: -56px; box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--gold-soft), 0 0 40px rgba(190, 30, 20, 0.25); }
@media (max-width: 640px) { .home-hero .wrap { padding-top: 36px; padding-bottom: 72px; } .hero-motto { letter-spacing: 3px; } .home-hero::before { background: linear-gradient(180deg, rgba(18, 8, 9, 0.6), rgba(18, 8, 9, 0.88)); } }
.site-footer { margin-top: 64px; padding: 24px 0 32px; border-top: 1px solid var(--gold-faint); color: var(--muted); font-size: 13px; }

/* Headings */
.eyebrow, .label, legend, .field > label:not(.check) { font-family: var(--caps); font-weight: 600; font-size: 12px; letter-spacing: 2px; color: var(--gold); text-transform: uppercase; }
h1 { font-family: var(--display); font-weight: 900; font-size: clamp(36px, 6vw, 52px); line-height: 1; margin: 6px 0 0; text-shadow: 0 0 18px rgba(190, 30, 20, 0.55); }
h2 { font-family: var(--display); font-weight: 700; }
.page-head { padding: 36px 0 24px; }
.page-head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.lead { color: var(--muted); margin: 10px 0 0; max-width: 60ch; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--gold-soft); border-radius: 4px; background: var(--panel); color: var(--text); font: 600 14px var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--gold); color: var(--text); }
.btn-primary { background: var(--blood); border-color: var(--gold); color: #fff; font-family: var(--caps); font-weight: 800; letter-spacing: 1px; }
.btn-primary:hover { background: #a3241a; color: #fff; }
.btn-danger { color: #ffb3a8; }
.btn-dashed { border-style: dashed; background: transparent; color: var(--gold); }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn-big { min-height: 50px; padding: 0 26px; font-size: 15px; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* Banner canvas */
canvas.hero-art { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; background: #0a0608; }

/* Home grid */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 20px; }
.event-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--gold-soft); text-decoration: none; color: var(--text); transition: border-color 0.15s; }
.event-card:hover { border-color: var(--gold); color: var(--text); }
.event-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.event-card h2 { margin: 0; font-size: 28px; line-height: 1.05; }
.meta { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 14px; }
.meta-row { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
.empty { padding: 48px 24px; border: 1px dashed var(--gold-soft); text-align: center; grid-column: 1 / -1; }

/* Event page */
.event { display: flex; flex-direction: column; gap: 24px; padding-top: 24px; }
.art-frame { border: 2px solid var(--gold); box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--gold-soft); }
.event-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.countdown { display: flex; flex-direction: column; align-items: flex-end; padding: 10px 18px; border: 2px solid var(--gold); background: #0e0406; }
.cd-label { font-family: var(--caps); font-size: 12px; font-weight: 600; letter-spacing: 2px; color: var(--gold); text-transform: uppercase; }
.cd-value { font-family: var(--display); font-weight: 900; font-size: 34px; line-height: 1.1; text-shadow: 0 0 14px rgba(190, 30, 20, 0.7); font-variant-numeric: tabular-nums; }
.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px 24px; padding: 18px 20px; background: var(--panel); border: 1px solid var(--gold-soft); }
.details > div > div:last-child { margin-top: 4px; }
.description { margin: 0; white-space: pre-line; max-width: 75ch; }
.panel { padding: 20px; background: var(--panel); border: 1px solid var(--gold-soft); }
.panel-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.panel-title { margin: 0 0 14px; font-size: 28px; line-height: 1.1; }
.panel-row .panel-title { margin: 0; }
.milestones { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.milestone { padding: 12px 14px; background: var(--bg); border: 1px solid var(--gold-soft); border-top: 3px solid var(--ember); }
.m-day { font-family: var(--caps); font-weight: 800; font-size: 12px; letter-spacing: 2px; color: var(--gold); text-transform: uppercase; }
.m-text { font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.15; margin-top: 2px; }

/* Roster */
.roster-roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.role-head { display: flex; justify-content: space-between; font-weight: 600; }
.count { color: var(--muted); font-variant-numeric: tabular-nums; }
.bar { height: 6px; margin: 6px 0 10px; background: #2a1415; }
.bar span { display: block; height: 100%; background: var(--gold); }
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.people.inline { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; }
.people li { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.open-slot { color: var(--muted); font-size: 14px; padding-left: 36px; border-left: 0; opacity: 0.8; }
.avatar { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }
.avatar-initial { display: inline-flex; align-items: center; justify-content: center; background: #3a1c1d; color: var(--gold); font-weight: 700; font-size: 13px; }
.tag { font-size: 12px; color: var(--muted); border: 1px solid var(--gold-faint); padding: 1px 6px; border-radius: 3px; }
h3.sub { font-family: var(--caps); font-size: 12px; letter-spacing: 2px; color: var(--gold); text-transform: uppercase; margin: 20px 0 8px; }

/* Notices / officer */
.notice { margin-top: 20px; padding: 12px 16px; border: 1px solid var(--gold); background: var(--panel); }
.notice-bad { border-color: var(--ember); color: #ffb3a8; margin-top: 0; }
.officer-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; padding: 10px 12px; border: 1px dashed var(--gold-soft); }
.officer-bar form { margin: 0; }
.status { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; background: #2a1415; color: var(--muted); }
.status-published { background: rgba(111, 191, 115, 0.15); color: var(--ok); }
.status-cancelled { background: rgba(196, 43, 28, 0.2); color: #ffb3a8; }
.table-wrap { overflow-x: auto; border: 1px solid var(--gold-soft); }
.events-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.events-table th, .events-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--gold-faint); vertical-align: middle; }
.events-table th { font-family: var(--caps); font-size: 12px; letter-spacing: 2px; color: var(--gold); font-weight: 600; }
.events-table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.events-table .actions form { margin: 0; }
.setup { margin-top: 24px; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.checklist li { display: flex; align-items: center; gap: 10px; }
.checklist .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ember); flex-shrink: 0; }
.checklist .ok .dot { background: var(--ok); }

/* Form */
.form-layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.form-col { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.preview-col { flex: 1 1 420px; min-width: 0; position: sticky; top: 16px; display: flex; flex-direction: column; gap: 10px; }
.preview-col canvas { border: 2px solid var(--gold); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
legend { margin-bottom: 8px; padding: 0; }
input[type="text"], input[type="url"], input[type="number"], input[type="date"], input[type="time"], textarea, select {
  width: 100%; min-height: 44px; padding: 10px 12px; background: var(--field); border: 1px solid var(--gold-soft); border-radius: 4px; color: var(--text); font: 15px var(--body);
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.25); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 44px; padding: 0 18px; border: 1px solid var(--gold-soft); border-radius: 4px; background: var(--panel); color: var(--text); font: 600 14px var(--body); cursor: pointer; }
.pill[aria-pressed="true"] { background: var(--blood); border-color: var(--gold); }
.templates { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tpl { display: inline-flex; }
.tpl .btn:first-child:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.tpl .tpl-del { border-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; padding: 0 10px; color: var(--muted); }
.milestone-row { display: flex; gap: 8px; margin-bottom: 8px; }
.milestone-row .m-day-in { width: 150px; flex-shrink: 0; font-weight: 700; color: var(--gold); }
.milestone-row .m-text-in { flex: 1; min-width: 0; }
.icon-btn { width: 44px; height: 44px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--gold-soft); border-radius: 4px; background: var(--panel); color: var(--muted); cursor: pointer; }
.bg-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px; border: 1px dashed var(--gold-soft); background: var(--field); }
.bg-picker img { width: 120px; height: 80px; object-fit: cover; border-radius: 3px; background: #000; }
.bg-info { flex: 1 1 160px; }
.focus-field { margin-top: 12px; max-width: 260px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--ember); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 16px; border-top: 1px solid var(--gold-faint); }
.form-status { min-height: 24px; color: var(--muted); }
.form-status.error { color: #ffb3a8; }
.form-status.ok { color: var(--ok); }

@media (max-width: 640px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .milestone-row { flex-wrap: wrap; }
  .milestone-row .m-day-in { width: calc(100% - 52px); }
  .preview-col { position: static; }
  .countdown { align-items: flex-start; }
}

/* Drag-and-drop overlay on the event form */
.drop-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(10, 4, 6, 0.82); pointer-events: none; }
.drop-box { max-width: 520px; padding: 48px 32px; border: 3px dashed var(--gold); background: var(--panel); text-align: center; font-family: var(--display); font-size: 32px; line-height: 1.15; color: var(--text); text-shadow: 0 0 14px rgba(190, 30, 20, 0.6); }

.pill-swatch { display: inline-flex; align-items: center; gap: 8px; }
.swatch { width: 16px; height: 16px; border-radius: 50%; border: 2px solid; flex-shrink: 0; }

/* Cheer counts on announcement pages */
.cheers { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.cheer { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; background: var(--bg); border: 1px solid var(--gold-soft); }
.cheer-head { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--gold-faint); }
.cheer .people { max-height: 320px; overflow-y: auto; }
.cheer .muted { margin: 0; }
.cheer-emoji { font-size: 22px; }
.cheer-label { flex: 1; font-weight: 600; }
.cheer-count { font-family: var(--display); font-weight: 900; font-size: 26px; color: var(--gold); font-variant-numeric: tabular-nums; }

/* Message board */
.post-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.post-form-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.posts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.post { padding: 14px 16px; background: var(--panel); border: 1px solid var(--gold-faint); }
.post-main, .post-reply { display: flex; gap: 12px; align-items: flex-start; }
.thread { scroll-margin-top: 16px; }
.thread:target { border-color: var(--gold); }
.post-removed { font-style: italic; font-size: 14px; }
.replies { list-style: none; margin: 10px 0 0 18px; padding: 0 0 0 16px; border-left: 2px solid var(--gold-faint); display: flex; flex-direction: column; gap: 10px; }
.post-reply .avatar { width: 28px; height: 28px; font-size: 13px; }
.more-replies { font-size: 13px; }
.reply-box { margin: 8px 0 0 48px; }
.reply-box summary { display: inline-block; cursor: pointer; color: var(--gold); font-size: 13px; font-weight: 600; padding: 6px 0; list-style: none; }
.reply-box summary::-webkit-details-marker { display: none; }
.reply-box[open] summary { color: var(--muted); }
.reply-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 4px; }
.reply-form textarea { min-height: 44px; }
@media (max-width: 640px) { .reply-box { margin-left: 0; } .replies { margin-left: 6px; } .reply-form { flex-direction: column; align-items: stretch; } }
.post .avatar { width: 36px; height: 36px; font-size: 15px; }
.post-body { flex: 1; min-width: 0; }
.post-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13px; color: var(--muted); }
.post-name { font-weight: 700; font-size: 15px; color: var(--gold); }
.post-text { margin: 4px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.post form { margin: 0; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { border-color: var(--gold-soft); }
.empty-board { padding: 24px; text-align: center; border: 1px dashed var(--gold-soft); }

/* Home: events and message board side by side */
.home-layout { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.home-events { flex: 999 1 560px; min-width: 0; }
.home-board { flex: 1 1 340px; min-width: 0; }
.home-events .event-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.section-title { font-size: 30px; line-height: 1.1; margin: 0 0 14px; }
.section-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.section-row .section-title { margin-bottom: 14px; }
.posts-compact .post { padding: 12px 14px; }
.posts-compact .post .avatar { width: 30px; height: 30px; }
.board-locked { padding: 24px; text-align: center; border: 1px dashed var(--gold-soft); background: var(--panel); }
.board-locked p { margin: 0 0 14px; color: var(--muted); }

/* Groups on dungeon/raid pages */
.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.group-card { padding: 14px; background: var(--bg); border: 1px solid var(--gold-soft); border-top: 3px solid var(--ember); display: flex; flex-direction: column; gap: 10px; }
.group-card.is-full { border-top-color: var(--ok); }
.group-head { display: flex; justify-content: space-between; align-items: center; }
.group-head h3 { margin: 0; font-family: var(--display); font-weight: 900; font-size: 24px; }
.group-role .people { margin-top: 6px; }
.group-new { border-style: dashed; border-top-width: 1px; justify-content: center; text-align: center; min-height: 120px; }
.chip { cursor: grab; border-radius: 4px; padding: 2px 4px; margin: 0 -4px; }
.chip > .member-text { flex: 1; min-width: 0; }
.chip.dragging { opacity: 0.4; }
.move-select { width: auto; min-height: 32px; padding: 2px 6px; font-size: 12px; }
.drop-target { outline: 2px dashed var(--gold); outline-offset: 2px; background: rgba(212, 175, 55, 0.08); }

/* Launch countdown (homepage) */
.launch { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; margin: 0 0 32px; padding: 24px 28px; background: radial-gradient(ellipse at 20% 0%, rgba(196, 43, 28, 0.35), transparent 60%), linear-gradient(180deg, #23100f, #120809); border: 2px solid var(--gold); box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--gold-soft); }
.launch-text { flex: 1 1 260px; min-width: 0; }
.launch-title { margin: 4px 0 0; font-family: var(--display); font-weight: 900; font-size: clamp(30px, 5vw, 44px); line-height: 1.05; text-shadow: 0 0 18px rgba(190, 30, 20, 0.6); }
.launch-when { margin: 8px 0 0; color: var(--muted); }
.lc { display: flex; gap: 10px; }
.lc-unit { display: flex; flex-direction: column; align-items: center; min-width: 78px; padding: 10px 8px 8px; background: #0e0406; border: 1px solid var(--gold-soft); border-top: 3px solid var(--ember); }
.lc-num { font-family: var(--display); font-weight: 900; font-size: 48px; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 0 14px rgba(190, 30, 20, 0.7); }
.lc-label { margin-top: 6px; font-family: var(--caps); font-weight: 600; font-size: 11px; letter-spacing: 2px; color: var(--gold); text-transform: uppercase; }
.launch-live-title { margin: 0; font-family: var(--display); font-weight: 900; font-size: 36px; color: var(--gold); }
.launch-live .muted { margin: 4px 0 0; }
@media (max-width: 640px) {
  .launch { padding: 18px 16px; }
  .lc { width: 100%; gap: 6px; }
  .lc-unit { flex: 1; min-width: 0; }
  .lc-num { font-size: 34px; }
  .lc-label { font-size: 10px; letter-spacing: 1px; }
}

/* Class and race breakdown bars */
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 96px 1fr 44px; align-items: center; gap: 10px; font-size: 14px; }
.bar-name { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cls-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cls, var(--gold)); flex-shrink: 0; }
.bar-track { display: flex; height: 12px; background: #2a1415; border-radius: 2px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--cls, var(--gold)); }
.bar-alt { opacity: 0.4; }
.bar-race { background: var(--gold); }
.bar-count { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.bars-key { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; }
.key { display: inline-block; width: 18px; height: 8px; background: var(--gold); }
.key-alt { opacity: 0.4; margin-left: 10px; }
.rolls-home { margin-bottom: 28px; }
.rolls-home .bars { margin-bottom: 10px; }
.btn-block { display: flex; width: 100%; margin-top: 12px; }

/* Who's rolling what page */
.rolls-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; margin-bottom: 32px; }
.rolls-layout > .panel:first-child { flex: 3 1 480px; min-width: 0; }
.rolls-layout > .panel:last-child { flex: 2 1 320px; min-width: 0; }
.rolls-layout h3.sub:first-of-type { margin-top: 8px; }
.pick-form { display: flex; flex-direction: column; gap: 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.tiles-race { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.tile { position: relative; display: block; cursor: pointer; }
.tile input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tile-body { display: flex; flex-direction: column; gap: 2px; min-height: 52px; justify-content: center; padding: 8px 12px; background: var(--field); border: 1px solid var(--gold-faint); border-left: 4px solid var(--cls, var(--gold-soft)); border-radius: 4px; }
.tile-race .tile-body { border-left-width: 1px; min-height: 44px; }
.tile-name { font-weight: 700; }
.tile-sub { font-size: 12px; color: var(--muted); }
.tile:hover .tile-body { border-color: var(--gold-soft); border-left-color: var(--cls, var(--gold-soft)); }
.tile input:checked + .tile-body { background: #2c1210; border-color: var(--gold); border-left-color: var(--cls, var(--gold)); box-shadow: 0 0 0 1px var(--gold); }
.tile input:focus-visible + .tile-body { outline: 2px solid var(--gold); outline-offset: 2px; }
.tile.is-off { cursor: not-allowed; }
.tile.is-off .tile-body { opacity: 0.35; }
.tile.is-off input { cursor: not-allowed; }
.pick-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; }
.pick-row .field { flex: 1 1 220px; }
.pick-row .check { min-height: 44px; }
.my-picks { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.my-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px 12px; background: var(--bg); border: 1px solid var(--gold-faint); border-left: 4px solid var(--cls); }
.my-pick .cls-dot { display: none; }
.my-pick-text { flex: 1 1 160px; min-width: 0; font-weight: 600; }
.my-pick form { margin: 0; }
.tag-main { color: var(--gold); border-color: var(--gold-soft); }
.cls-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.cls-group { padding: 14px; background: var(--panel); border: 1px solid var(--gold-soft); border-top: 3px solid var(--cls); display: flex; flex-direction: column; gap: 10px; }
.cls-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cls-head h3 { margin: 0; font-family: var(--display); font-weight: 900; font-size: 24px; color: var(--cls); }
.cls-group .people li { gap: 10px; }
.cls-group form { margin: 0 0 0 auto; }
.pick-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; flex: 1; }
.pick-who > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rolls-home .section-title { font-size: 26px; }
.rolls-home .section-row a, .home-board .section-row a { white-space: nowrap; }

/* Guild map */
.map-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 8px; padding: 10px 12px; border: 1px dashed var(--gold-soft); }
.map-tools .btn[aria-pressed="true"] { background: var(--gold); color: #1a0a08; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.map-frame { position: relative; border: 2px solid var(--gold); box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--gold-soft); }
.map-frame.is-drop::after { content: 'Drop the screenshot to use it as the map'; position: absolute; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: rgba(18, 8, 9, 0.85); color: var(--gold); font: 800 18px var(--caps); letter-spacing: 1px; border: 2px dashed var(--gold); }
.guild-map { height: 60vh; min-height: 320px; background: #120809; font-family: var(--body); }
.guild-map.is-adding, .guild-map.is-adding .leaflet-interactive { cursor: crosshair; }
.map-side { display: flex; flex-direction: column; gap: 16px; }
.map-side .panel-title { font-size: 24px; }
.legend { display: flex; flex-direction: column; gap: 2px; }
.legend-item { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.legend-item input { width: 18px; height: 18px; accent-color: var(--gold); margin: 0; }
.legend-label { flex: 1; }
.legend-count { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; }
.pin-meet { --pin: #d4af37; }
.pin-dungeon { --pin: #c42b1c; }
.pin-travel { --pin: #3f8fd2; }
.pin-leveling { --pin: #4f9a52; }
.pin-note { --pin: #a8927a; }
.pin-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--pin); border: 2px solid #1a0a08; box-shadow: 0 0 0 1px var(--pin); flex-shrink: 0; }
.pin-list { list-style: none; margin: 0; padding: 0; }
.pin-list-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 6px 8px; background: transparent; border: 1px solid transparent; border-radius: 4px; color: var(--text); font: 15px var(--body); text-align: left; cursor: pointer; }
.pin-list-btn:hover { border-color: var(--gold-soft); background: var(--bg); }
#pin-list h3.sub:first-child { margin-top: 0; }
.pin-editor { border-color: var(--gold); }
.pin-editor .field { margin-bottom: 12px; }

/* Leaflet overrides to match the site */
.map-pin { background: none; border: 0; }
.map-pin svg { display: block; overflow: visible; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.7)); }
.map-pin .pin-body { fill: var(--pin, #a8927a); stroke: #1a0a08; stroke-width: 2; }
.map-pin .pin-hole { fill: rgba(0, 0, 0, 0.3); }
.map-pin.is-active .pin-body { stroke: #fff; stroke-width: 2.5; }
.map-pin.is-active svg { transform: scale(1.15); transform-origin: 50% 100%; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); width: 32px; height: 32px; font: 22px/30px var(--body); }
.leaflet-container a.leaflet-popup-close-button:hover { color: var(--gold); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); color: var(--text); border: 1px solid var(--gold); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.7); }
.leaflet-popup-content-wrapper { border-radius: 4px; }
.leaflet-popup-content { margin: 14px 18px 14px 16px; font: 15px/1.45 var(--body); }
.pin-popup h3 { margin: 2px 0 6px; font: 700 24px/1.1 var(--display); outline: none; }
.pin-popup p { margin: 0 0 8px; white-space: pre-line; }
.pin-popup a { display: inline-block; margin: 0 0 8px; color: var(--gold); }
.pin-popup .btn { display: flex; margin-top: 4px; }
.leaflet-bar a, .leaflet-bar a:hover { background: var(--panel); color: var(--gold); border-bottom-color: var(--gold-soft); width: 36px; height: 36px; line-height: 36px; }
.leaflet-bar a:hover { background: var(--blood); color: #fff; }
.leaflet-bar { border: 1px solid var(--gold-soft) !important; box-shadow: none !important; }
.leaflet-container:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

@media (max-width: 900px) {
  .map-layout { grid-template-columns: 1fr; }
}

/* Guild map: levels (world -> continent -> zone) */
.map-main { min-width: 0; }
.map-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 10px; }
.map-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-family: var(--caps); font-weight: 600; font-size: 14px; letter-spacing: 1px; }
.crumb { min-height: 36px; padding: 0 6px; background: none; border: 0; border-radius: 4px; color: var(--gold); font: inherit; letter-spacing: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.crumb:hover { color: var(--text); }
.crumb-sep { color: var(--muted); }
.crumb-current { color: var(--text); padding: 0 6px; }
.map-pick select { width: auto; min-width: 220px; }
.map-note { margin: 8px 0 0; }
.zone-label { background: none; border: 0; width: auto !important; height: auto !important; }
.zone-label span { display: inline-block; transform: translate(-50%, -50%); padding: 3px 8px; white-space: nowrap; background: rgba(18, 8, 9, 0.78); border: 1px solid var(--gold-soft); border-radius: 3px; color: var(--text); font: 600 12px/1.3 var(--body); cursor: pointer; }
.zone-label:hover span, .zone-label:focus-visible span { background: var(--blood); border-color: var(--gold); color: #fff; }
.zone-label:focus-visible { outline: none; }
.zone-label.is-small span { font-size: 11px; padding: 2px 6px; }
.zone-label.is-approx span { border-style: dashed; }
.map-pin.is-mini svg { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8)); opacity: 0.92; }
@media (max-width: 640px) {
  .map-pick, .map-pick select { width: 100%; }
  .zone-label span { font-size: 11px; padding: 2px 6px; }
}
.zone-label.is-hidden { visibility: hidden; pointer-events: none; }

/* Guild map: one zoomable world */
.map-where { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-height: 36px; }
.guild-map .art { transition: opacity 0.15s linear; }
.guild-map .art.is-off { visibility: hidden; }
.zone-label.lvl-1 span { font: 800 15px/1.2 var(--caps); letter-spacing: 2px; text-transform: uppercase; padding: 4px 10px; color: var(--gold); }
.pin-list-btn { flex-wrap: wrap; }
.pin-where { flex-basis: 100%; padding-left: 24px; margin-top: -4px; }

/* Map labels: map-style lettering (no boxes) */
.zone-label span, .zone-label.is-small span, .zone-label.lvl-1 span {
  background: none; border: 0; padding: 2px 4px;
  font: 700 15px/1.1 var(--caps); letter-spacing: 1.5px; text-transform: uppercase; color: #f6dc8a;
  text-shadow: 0 0 3px #000, 0 0 6px #000, 0 1px 2px #000;
}
.zone-label.lvl-1 span { font-size: 22px; font-weight: 800; letter-spacing: 3px; }
.zone-label.is-small span, .zone-label.lvl-3 span { font-size: 12px; }
.zone-label.is-approx span { font-style: italic; color: #e8cf86; border: 0; }
.zone-label:hover span, .zone-label:focus-visible span { background: none; border: 0; color: #fff; text-shadow: 0 0 3px #000, 0 0 8px var(--blood), 0 0 12px #000; }
.zone-label:focus-visible span { outline: 2px solid var(--gold); outline-offset: 2px; }
.zone-label { transition: opacity 0.12s linear; }
@media (max-width: 640px) {
  .zone-label span, .zone-label.is-small span { font-size: 12px; padding: 1px 3px; }
  .zone-label.lvl-1 span { font-size: 17px; }
}

/* Map labels shrink as you zoom in (--ls set by map.js) */
.zone-label span { transform-origin: center; transform: translate(-50%, -50%) scale(var(--ls, 1)); }
.zone-label { transition: opacity 0.18s linear; }
/* Hover: zone outline + name and level range */
.zone-hover-shape { fill: #f6dc8a; fill-opacity: 0.08; stroke: #f6dc8a; stroke-width: 2; stroke-opacity: 0.9; stroke-dasharray: 6 4; filter: drop-shadow(0 0 3px #000); }
.zone-hover-tag { background: none; border: 0; width: auto !important; height: auto !important; }
.zone-hover-tag span { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; transform: translate(-50%, -50%); white-space: nowrap; text-align: center;
  padding: 4px 10px 5px; background: rgba(18, 8, 9, 0.72); border: 1px solid var(--gold); border-radius: 3px; box-shadow: 0 2px 10px rgba(0,0,0,.6); }
.zone-hover-tag b { font: 800 16px/1.1 var(--caps); letter-spacing: 1.5px; text-transform: uppercase; color: #fff3c4; text-shadow: 0 0 4px #000; }
.zone-hover-tag i { font: 600 12px/1.2 var(--body); font-style: normal; color: var(--gold); letter-spacing: .5px; }
@media (max-width: 640px) { .zone-hover-tag b { font-size: 13px; } }
/* Hover info when zoomed into one zone: small badge at the top of the map */
.zone-badge { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 800; pointer-events: none;
  display: flex; align-items: baseline; gap: 10px; padding: 5px 12px; white-space: nowrap;
  background: rgba(18, 8, 9, 0.8); border: 1px solid var(--gold); border-radius: 3px; box-shadow: 0 2px 10px rgba(0,0,0,.6); }
.zone-badge b { font: 800 14px/1.1 var(--caps); letter-spacing: 1.5px; text-transform: uppercase; color: #fff3c4; }
.zone-badge i { font: 600 12px/1.1 var(--body); font-style: normal; color: var(--gold); }
.zone-hover-shape.is-focused { fill-opacity: 0; stroke-opacity: 0.7; }

/* ===== Map page: full-screen tool ===== */
body.map-page { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body.map-page > main.wrap { flex: 1; min-height: 0; max-width: none; width: 100%; margin: 0; padding: 0; display: flex; }
body.map-page .site-footer { display: none; }
.mapapp { position: relative; flex: 1; min-height: 0; display: flex; background: #120809; }
.mapapp-side { width: 340px; flex-shrink: 0; display: flex; flex-direction: column; min-height: 0; background: #150a0b; border-right: 1px solid var(--gold-soft); transition: margin-left .2s ease; z-index: 2; }
.mapapp.side-hidden .mapapp-side { margin-left: -340px; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 10px; border-bottom: 1px solid var(--gold-faint); }
.side-h1 { margin: 0; font: 900 30px/1 var(--display); text-shadow: 0 0 14px rgba(190,30,20,.5); }
.side-scroll { flex: 1; overflow-y: auto; padding: 12px 14px 24px; display: flex; flex-direction: column; gap: 14px; }
.side-sec { padding: 12px; background: var(--panel); border: 1px solid var(--gold-faint); border-radius: 4px; }
.side-title { margin: 0 0 8px; font: 600 12px/1.2 var(--caps); letter-spacing: 2px; text-transform: uppercase; color: var(--gold); }
.side-sec .legend-item { min-height: 34px; }
.side-sec .form-actions { padding-top: 10px; }
.side-sec .pin-list-btn { min-height: 36px; padding: 4px 6px; font-size: 14px; }
.mapapp-side .form-status:empty { display: none; }
.icon-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; min-width: 38px; justify-content: center; padding: 0 10px; background: rgba(21,10,11,.92); color: var(--gold); border: 1px solid var(--gold-soft); border-radius: 4px; cursor: pointer; font: 600 13px var(--body); }
.icon-btn:hover { border-color: var(--gold); color: var(--text); }
.icon-btn[aria-pressed="true"] { background: var(--gold); color: #1a0a08; }

/* Search */
.map-search { position: relative; }
.map-search .search-icon { position: absolute; left: 11px; top: 13px; color: var(--muted); pointer-events: none; }
.map-search input { width: 100%; min-height: 42px; padding: 8px 10px 8px 34px; background: var(--field); border: 1px solid var(--gold-soft); border-radius: 4px; color: var(--text); font: 15px var(--body); }
.map-search input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 2px rgba(212,175,55,.25); }
.search-results { list-style: none; margin: 4px 0 0; padding: 4px; position: absolute; left: 0; right: 0; z-index: 20; background: #1c0d0e; border: 1px solid var(--gold); border-radius: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.6); max-height: 320px; overflow-y: auto; }
.search-results li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 3px; cursor: pointer; }
.search-results li[aria-selected="true"], .search-results li:hover { background: var(--blood); }
.search-results .sr-kind { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.search-results li[aria-selected="true"] .sr-kind, .search-results li:hover .sr-kind { color: #f2e2c4; }
.search-results .sr-empty { color: var(--muted); cursor: default; }

/* Level finder */
.level-row { display: flex; align-items: center; gap: 10px; }
.level-row label { font-size: 14px; color: var(--muted); white-space: nowrap; }
.level-row input { width: 90px; min-height: 38px; padding: 6px 10px; }
.level-zones { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.level-zones button { min-height: 32px; padding: 3px 10px; background: var(--bg); border: 1px solid var(--gold-soft); border-radius: 16px; color: var(--text); font: 13px var(--body); cursor: pointer; }
.level-zones button:hover { border-color: var(--gold); background: var(--blood); }
.level-zones button i { font-style: normal; color: var(--gold); margin-left: 4px; }
.level-zones .muted { font-size: 13px; }
.zone-level-shape { fill: #f6dc8a; fill-opacity: .16; stroke: #f6dc8a; stroke-width: 2; stroke-opacity: .85; }
.zone-border-shape { fill: none; stroke: #f6dc8a; stroke-width: 1.2; stroke-opacity: .55; stroke-dasharray: 4 4; }

/* Map area */
.mapapp-main { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mapapp-main .guild-map { flex: 1; height: auto !important; min-height: 0; }
.map-top { position: absolute; top: 10px; left: 56px; right: 10px; z-index: 900; display: flex; align-items: flex-start; gap: 8px; pointer-events: none; }
.map-top > * { pointer-events: auto; }
#side-open { display: none; }
.mapapp.side-hidden #side-open { display: inline-flex; }
.side-open-label, .close-label { display: none; }
.map-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 3px; background: rgba(21,10,11,.92); border: 1px solid var(--gold-soft); border-radius: 4px; }
.map-tab { min-height: 32px; padding: 0 12px; background: none; border: 0; border-radius: 3px; color: var(--text); font: 600 13px var(--body); cursor: pointer; }
.map-tab:hover { color: var(--gold); }
.map-tab[aria-current="true"] { background: var(--blood); color: #fff; }
.map-pick { width: auto; min-height: 32px; padding: 2px 8px; font-size: 13px; background: var(--field); }
#map-full { margin-left: auto; }
.map-where-bar { position: absolute; top: 58px; left: 56px; z-index: 900; display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: rgba(21,10,11,.92); border: 1px solid var(--gold-soft); border-radius: 4px; max-width: calc(100% - 76px); }
.mapapp .leaflet-top.leaflet-left { top: 0; }
.mapapp .zone-badge { top: 56px; }
/* Fullscreen: the map tool covers the whole window */
.mapapp.is-full { position: fixed; inset: 0; z-index: 2000; }

/* Phones and narrow windows: map on top, panel slides up from the bottom */
@media (max-width: 800px) {
  .mapapp { flex-direction: column; }
  .mapapp-main { order: 1; }
  .mapapp-side { order: 2; position: absolute; left: 0; right: 0; bottom: 0; width: auto; max-height: 62%; border-right: 0; border-top: 2px solid var(--gold); border-radius: 12px 12px 0 0; box-shadow: 0 -8px 24px rgba(0,0,0,.6); transition: transform .22s ease; margin: 0 !important; z-index: 1000; }
  .mapapp.side-hidden .mapapp-side { transform: translateY(110%); }
  .side-head { padding: 8px 14px; }
  .side-h1 { font-size: 22px; }
  .side-scroll { padding: 10px 12px 18px; }
  .map-top { left: 52px; right: 8px; top: 8px; flex-wrap: wrap; }
  .map-tab { padding: 0 8px; font-size: 12px; }
  .map-pick { max-width: 130px; }
  .mapapp.side-hidden #side-open { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; top: auto; z-index: 1001; box-shadow: 0 4px 16px rgba(0,0,0,.6); min-height: 44px; padding: 0 16px; white-space: nowrap; }
  #side-close .close-label { display: inline; }
  #side-close svg { display: none; }
  .side-open-label { display: inline; }
  .map-where-bar { top: auto; bottom: 74px; left: 8px; }
}
.guild-map.hide-names .zone-label { display: none; }

/* Places (reference markers) */
.poi-flight { --poi: #3f86c8; } .poi-inn { --poi: #b5762a; } .poi-boat { --poi: #2f9c9a; } .poi-zeppelin { --poi: #a23b2a; } .poi-skyship { --poi: #7a5cc4; } .poi-dungeon { --poi: #2f7d4f; } .poi-raid { --poi: #9b2d6e; }
.poi-marker { background: none; border: 0; }
.poi-marker svg { display: block; width: 24px; height: 24px; padding: 4px; box-sizing: border-box; border-radius: 50%; background: var(--poi); border: 2px solid #f6dc8a; box-shadow: 0 1px 4px rgba(0,0,0,.8); }
.poi-marker:hover svg { transform: scale(1.15); }
.poi-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--poi); border: 2px solid #f6dc8a; flex-shrink: 0; }
.faction-pick { display: flex; gap: 4px; margin-bottom: 8px; }
.faction-pick label { flex: 1; }
.faction-pick input { position: absolute; opacity: 0; pointer-events: none; }
.faction-pick span { display: flex; align-items: center; justify-content: center; min-height: 32px; border: 1px solid var(--gold-soft); border-radius: 4px; font-size: 13px; cursor: pointer; }
.faction-pick input:checked + span { background: var(--blood); border-color: var(--gold); color: #fff; }
.faction-pick input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.pin-popup .poi-sub { color: var(--muted); margin-top: -4px; }
.pin-popup .poi-faction { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 10px; border: 1px solid var(--gold-soft); }
.poi-faction.f-A { color: #9cc3ff; border-color: #4d74b8; } .poi-faction.f-H { color: #ff9c8c; border-color: #a33b2a; } .poi-faction.f-AH { color: var(--gold); }
.pin-popup .poi-src { font-size: 12px; color: var(--muted); font-style: italic; margin-bottom: 0; }
.poi-route { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-opacity: .9; filter: drop-shadow(0 0 2px rgba(0,0,0,.7)); }
.route-boat { stroke: #7fe0dc; stroke-dasharray: 10 8; animation: route-sail 3s linear infinite; }
.route-zeppelin { stroke: #ff9a7e; stroke-dasharray: 2 7; animation: route-sail 2.4s linear infinite; }
.route-skyship { stroke: #c4b0ff; stroke-dasharray: 2 7; }
.poi-route.is-hot { stroke-width: 6; stroke-opacity: 1; filter: drop-shadow(0 0 4px rgba(0,0,0,.9)); }
.poi-route-hit { cursor: pointer; stroke: #000; }
.poi-route-hit.is-off { display: none; }
.leaflet-container path.leaflet-interactive:focus { outline: none; }
.route-ends { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.route-ends .btn { margin: 0; }
@keyframes route-sail { to { stroke-dashoffset: -36; } }
@media (prefers-reduced-motion: reduce) { .poi-route { animation: none; } }
.poi-route.is-off { display: none; }
.route-tip { background: #1c0d0e; color: var(--text); border: 1px solid var(--gold); box-shadow: 0 2px 8px rgba(0,0,0,.6); font: 600 13px var(--body); }
.route-tip::before { display: none; }
/* Departures */
.dep-title { margin: 6px 0 4px; font: 600 11px/1.2 var(--caps); letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); }
.dep-list, .dep-list li, .dep-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dep-head .poi-faction { margin-left: auto; }
.pin-popup .dep-how, .poi-route.is-chosen { stroke-width: 6; stroke-opacity: 1; }
.poi-route.is-dim { stroke-opacity: .18; animation: none; }

/* Dungeon and raid entrances: square markers so they stand apart from travel icons */
.poi-marker.is-instance svg { width: 26px; height: 26px; border-radius: 6px; }
.poi-dungeon.poi-swatch, .poi-raid.poi-swatch { border-radius: 3px; }
.poi-marker.is-approx svg { border-style: dashed; opacity: .85; }
#level-zones .level-sub { flex-basis: 100%; width: 100%; margin: 8px 0 2px; font: 700 11px/1 var(--caps); letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); list-style: none; }
#level-zones button .poi-swatch { width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }
#poi-unpinned { margin-top: 8px; }

/* PvP territory tags */
.side { display: inline-block; font: 700 10px/1 var(--body); font-style: normal; letter-spacing: .6px; text-transform: uppercase; padding: 3px 6px; border-radius: 3px; border: 1px solid; white-space: nowrap; }
.side-A { color: #9cc4ff; border-color: #4f7fc4; background: rgba(30, 60, 120, .55); }
.side-H { color: #ff9c8c; border-color: #b8463a; background: rgba(120, 25, 20, .55); }
.side-C { color: #f2d27a; border-color: #a8873a; background: rgba(90, 70, 20, .55); }
.side-S { color: #d6c6ff; border-color: #7a5cc4; background: rgba(60, 40, 110, .55); }
.zone-hover-tag .side { margin-top: 2px; text-shadow: none; }
.zone-badge .side { align-self: center; }
.level-zones button .side { margin-left: 6px; padding: 2px 4px; font-size: 9px; vertical-align: 1px; }
.side-key { margin: 10px 0 0; color: var(--muted); line-height: 1.7; }
.side-key .side { font-size: 9px; padding: 2px 4px; }

/* Group builder: classes, role warnings, officer tools */
.member { display: flex; align-items: center; gap: 8px; }
.people li.chip { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 8px; padding: 6px 4px; }
.member-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.class-tag { align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--cc, var(--muted)); }
.class-tag .alt-count { color: var(--muted); font-weight: 600; }
.class-none { font-weight: 500; color: var(--muted); font-style: italic; }
.role-warn { font-size: 12px; font-weight: 700; color: #ffb3a8; }
.chip-tools { grid-column: 1 / -1; display: flex; align-items: center; gap: 4px; }
.chip-tools .move-select { flex: 1; min-width: 0; }
.chip-tools .icon-btn { width: auto; min-width: 32px; height: 32px; padding: 0 8px; font-size: 16px; }
.remove-btn.armed { color: #fff; background: var(--blood); border-color: var(--ember); }
.group-role.drop-target { outline-offset: 4px; }
.pin-popup .pin-author { margin: 2px 0 6px; font-size: 13px; color: var(--gold); }

.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-head .side-title { margin-bottom: 0; }
.side-head + * { margin-top: 8px; }
#poi-all { min-height: 28px; padding: 2px 10px; font-size: 12px; }

/* Sign-up history (bottom of event pages) */
.history details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.history details > summary::-webkit-details-marker { display: none; }
.history details > summary::before { content: '▸'; color: var(--gold); transition: transform 0.15s; }
.history details[open] > summary::before { transform: rotate(90deg); }
.history summary .panel-title { margin: 0; }
.history-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; }
.history-list li { display: grid; grid-template-columns: 11.5em minmax(0, 1fr); gap: 12px; padding: 7px 0; border-top: 1px solid rgba(212, 175, 55, 0.12); font-size: 14px; }
.history-time { color: var(--muted); font-size: 13px; white-space: nowrap; }
.history-list li.by-officer .history-text { color: var(--gold); }
@media (max-width: 520px) { .history-list li { grid-template-columns: 1fr; gap: 2px; } }
.launch-local { color: var(--muted); font-size: 0.85em; white-space: nowrap; }

/* Roster (Nov 5, 2026) */
.class-tag .lvl { color: var(--text); font-weight: 600; }
.callout { padding: 10px 14px; margin-bottom: 12px; border: 1px solid var(--gold); background: rgba(212, 175, 55, 0.08); font-size: 14px; }
.tag-unconfirmed { color: #ffcf8a; border-color: rgba(255, 207, 138, 0.5); }
.my-pick { flex-direction: column; align-items: stretch; }
.my-pick-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.my-pick.is-unconfirmed { border-color: rgba(255, 207, 138, 0.45); }
.level-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.level-form input[type="number"] { width: 5.5em; min-height: 32px; padding: 2px 8px; }
.my-pick-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.char-edit > summary, .add-char > summary, .manage > summary, .officer-roster summary { cursor: pointer; color: var(--gold); font-size: 14px; }
.char-edit[open] > summary { margin-bottom: 8px; }
.char-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px 10px; margin-bottom: 10px; }
.char-fields .field { margin: 0; }
.char-fields .field-level { max-width: 110px; }
.pick-row .field-level { flex: 0 0 110px; }
.add-char > summary { margin: 16px 0 8px; font-size: 16px; }
.officer-roster { margin-bottom: 32px; }
.officer-roster details { margin-bottom: 14px; }
.officer-roster form { margin-top: 10px; }
.clear-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

.roster-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 8px 0 12px; }
.roster-controls label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.roster-controls select { width: auto; min-height: 34px; padding: 2px 8px; }
.roster-table { width: 100%; border-collapse: collapse; }
.roster-table th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--gold-soft); }
.roster-table td { padding: 8px 10px; border-bottom: 1px solid rgba(212, 175, 55, 0.12); vertical-align: middle; }
.roster-table tr.is-main td { border-top: 1px solid rgba(212, 175, 55, 0.22); }
.roster-table .c-name { border-left: 3px solid var(--cls); }
.roster-table .char-name { font-weight: 700; margin-right: 6px; }
#roster-body:not(.is-flat) tr.is-alt .c-name { padding-left: 28px; }
#roster-body:not(.is-flat) tr.is-alt .char-name { font-weight: 500; }
.roster-table .cls-name { color: var(--cls); font-weight: 600; }
.roster-table .lvl-num { font-weight: 700; font-size: 16px; margin-right: 6px; }
.roster-table .lvl-when { white-space: nowrap; }
.roster-table .who { display: inline-flex; align-items: center; gap: 8px; }
.roster-table tr.is-mine { background: rgba(212, 175, 55, 0.05); }
.manage { display: inline-block; margin-left: 10px; }
.manage-body { display: flex; flex-direction: column; gap: 8px; padding: 8px 0; }
.link-form { display: flex; flex-wrap: wrap; gap: 6px; }
.link-form select { width: auto; max-width: 100%; min-height: 32px; }
@media (max-width: 700px) {
  .roster-table thead { display: none; }
  .roster-table, .roster-table tbody, .roster-table tr, .roster-table td { display: block; width: 100%; }
  .roster-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 12px; border-bottom: 1px solid rgba(212, 175, 55, 0.15); border-left: 3px solid var(--cls); }
  .roster-table td { padding: 0; border: 0; }
  .roster-table .c-name { grid-column: 1; border: 0; }
  .roster-table .c-level { grid-column: 2; grid-row: 1; text-align: right; }
  .roster-table .c-class, .roster-table .c-race { display: inline; grid-column: 1; font-size: 14px; }
  .roster-table .c-class { grid-row: 2; }
  .roster-table .c-race { grid-row: 2; grid-column: 2; text-align: right; color: var(--muted); }
  .roster-table .c-who { grid-column: 1 / -1; font-size: 14px; margin-top: 4px; }
  #roster-body:not(.is-flat) tr.is-alt { margin-left: 18px; width: auto; }
  #roster-body:not(.is-flat) tr.is-alt .c-name { padding-left: 0; }
  .roster-table tr.is-main td { border-top: 0; }
}

/* Roster banner (homepage, under the launch countdown) */
.roster-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; margin: -12px 0 32px; padding: 18px 24px; background: linear-gradient(90deg, rgba(196, 43, 28, 0.18), rgba(18, 8, 9, 0) 70%), var(--panel); border: 1px solid var(--gold-soft); border-left: 4px solid var(--gold); }
.roster-banner-text { flex: 1 1 320px; min-width: 0; }
.roster-banner h2 { margin: 2px 0 4px; font-family: var(--display); font-size: 24px; }
.roster-banner p { margin: 0; color: var(--muted); }
.roster-banner .btn { flex: 0 0 auto; }
@media (max-width: 520px) { .roster-banner .btn { width: 100%; text-align: center; } }

/* Profile (/me) */
.site-header nav a.who:hover, .site-header nav a.who[aria-current="page"] { color: var(--gold); }
.profile-head { display: flex; align-items: center; gap: 18px; margin: 8px 0 28px; }
.profile-head h1 { margin: 2px 0 4px; }
.profile-head p { margin: 0; }
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--gold); flex: 0 0 auto; object-fit: cover; }
.profile-avatar.avatar-initial { display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; background: var(--panel); color: var(--gold); }
.my-signups { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; }
.my-signups li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid rgba(212, 175, 55, 0.12); }
.my-signups li a { font-weight: 700; flex: 1 1 100%; }

/* Join (/join) and officer applications */
.join-panel { max-width: 720px; }
.join-steps { margin: 0 0 20px; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.join-form textarea { width: 100%; }
.app-list { list-style: none; margin: 0 0 10px; padding: 0; }
.app-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; padding: 12px 0; border-bottom: 1px solid rgba(212, 175, 55, 0.12); }
.app-actions { display: flex; gap: 8px; }
#applications { margin-bottom: 28px; border-color: var(--gold); }
.join-form > .btn { margin-top: 8px; }
.field-rank { max-width: 260px; margin-bottom: 14px; }
.hero-login { margin: 12px 0 0; color: var(--muted); }
