:root {
  --bg: #0B1626;
  --panel: #102036;
  --panel-2: #152a45;
  --line: #1f3757;
  --text: #eaf4fb;
  --muted: #8ea6c0;
  --accent: #5EC2F2;
  --accent-ink: #06121f;
  --free: #3fb27f;
  --half: #f2b84b;
  --full: #e5484d;
  --radius: 10px;
  --hex: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg) radial-gradient(1200px 500px at 70% -10%, #13304f 0%, transparent 60%) no-repeat;
  color: var(--text);
  font: 15px/1.5 'Chakra Petch', system-ui, sans-serif;
  min-height: 100vh;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: .02em; }
h1 { font-size: clamp(28px, 5vw, 44px); }
h2 { font-size: 20px; text-transform: uppercase; letter-spacing: .08em; }
h3 { font-size: 16px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.small { font-size: 13px; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 24px; border-bottom: 1px solid var(--line);
  background: rgba(11, 22, 38, .85); backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 10;
}
.brand img { object-fit: contain; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 18px; letter-spacing: .12em; }
.brand b { color: var(--accent); font-weight: 700; }
#nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
#nav a { color: var(--muted); text-decoration: none; text-transform: uppercase; font-size: 13px; letter-spacing: .1em; }
#nav a.active, #nav a:hover { color: var(--text); }
#nav a.btn { color: var(--accent-ink); }
.who { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.who img { width: 28px; height: 28px; clip-path: var(--hex); background: var(--panel-2); }

main { max-width: 1200px; margin: 0 auto; padding: 28px 24px 60px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 14px 'Chakra Petch', sans-serif; letter-spacing: .08em; text-transform: uppercase;
  padding: 10px 18px; border-radius: 6px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.danger { background: transparent; color: var(--full); border-color: var(--full); }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn.discord { background: #5865F2; border-color: #5865F2; color: #fff; font-size: 16px; padding: 14px 26px; }

input, select {
  font: 15px 'Chakra Petch', sans-serif; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 6px; padding: 9px 11px; width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.chip {
  display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase; background: var(--panel-2); color: var(--accent); border: 1px solid var(--line);
}
.chip.closed { color: var(--muted); }
.chip.mine { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* Landing */
.hero { display: grid; place-items: center; text-align: center; gap: 18px; padding: 8vh 0; }
.hero img { width: min(220px, 50vw); filter: drop-shadow(0 10px 40px rgba(94, 194, 242, .25)); }
.hero p { max-width: 520px; margin: 0; color: var(--muted); font-size: 17px; }

/* Start page */
.hero.big { padding: 9vh 0 6vh; }
.hero.big h1 { font-size: clamp(34px, 6.5vw, 64px); max-width: 820px; margin: 0; }
.hero.big img { width: min(170px, 40vw); }
.accent { color: var(--accent); }
.cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.block { margin-top: 56px; }
.block > h2 { margin-bottom: 18px; }
.offers { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.offer { display: grid; gap: 8px; align-content: start; }
.offer h3, .offer p, .steps h3, .steps p { margin: 0; }
.hexicon { width: 30px; height: 30px; clip-path: var(--hex); background: linear-gradient(135deg, var(--accent), #2d7fb0); }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.steps li { counter-increment: step; display: grid; gap: 6px; align-content: start; }
.steps li::before {
  content: counter(step); width: 30px; height: 30px; clip-path: var(--hex); display: grid; place-items: center;
  background: var(--panel-2); color: var(--accent); font-weight: 700; border: 1px solid var(--line);
}
.foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 64px; padding-top: 22px; border-top: 1px solid var(--line); }
.foot a { color: var(--muted); }

/* Session list */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.session { display: grid; gap: 8px; color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.session:hover { border-color: var(--accent); transform: translateY(-2px); }
.session .row { display: flex; gap: 6px; flex-wrap: wrap; }
.when { font-size: 22px; font-weight: 600; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* Map */
.layout { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }
.map {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background-color: var(--panel);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 10% 10%;
  user-select: none;
}
.map.noimg { aspect-ratio: 1; }
.map img.bg { display: block; width: 100%; height: auto; }
.map.edit { cursor: crosshair; }
.poi {
  position: absolute; transform: translate(-50%, -50%);
  display: grid; justify-items: center; gap: 2px; background: none; border: 0; padding: 0; cursor: pointer;
  font: 600 11px 'Chakra Petch', sans-serif; color: #fff; text-shadow: 0 1px 3px #000, 0 0 2px #000;
}
.poi .hex {
  width: 26px; height: 26px; clip-path: var(--hex); display: grid; place-items: center;
  background: var(--free); color: #04120b; font-size: 11px; font-weight: 700; text-shadow: none;
}
.poi.half .hex { background: var(--half); }
.poi.full .hex { background: var(--full); color: #fff; }
.poi.sel .hex { background: #fff; color: var(--accent-ink); }
.poi.mine .hex { background: var(--accent); color: var(--accent-ink); }
.poi .label { white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.poi:focus-visible .hex { transform: scale(1.2); }
.poi.sel .hex, .poi:hover .hex { transform: scale(1.18); }
.poi.sel .label { color: var(--accent); }

.side { display: grid; gap: 14px; position: sticky; top: 84px; }
.list { display: grid; gap: 4px; max-height: 50vh; overflow: auto; }
.item {
  display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; text-align: left;
  padding: 8px 10px; border-radius: 6px; border: 1px solid transparent; background: none; color: var(--text);
  font: 14px 'Chakra Petch', sans-serif; cursor: pointer; width: 100%;
}
.item:hover { background: var(--panel-2); }
.item.sel { border-color: var(--accent); background: var(--panel-2); }
.item .teams { grid-column: 2 / 4; font-size: 12px; color: var(--muted); }
.dot { width: 10px; height: 10px; clip-path: var(--hex); background: var(--free); }
.dot.half { background: var(--half); }
.dot.full { background: var(--full); }
.dot.mine { background: var(--accent); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.stack { display: grid; gap: 10px; }
.claims-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.claims-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }

/* Admin */
.admin { display: grid; gap: 22px; }
.form { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
td .btn + .btn { margin-left: 6px; }
.tablewrap { overflow-x: auto; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--panel-2); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  padding: 10px 16px; border-radius: 6px; transition: .2s; pointer-events: none; max-width: 90vw; z-index: 20;
}
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.err { border-left-color: var(--full); }

@media (max-width: 600px) {
  .top { padding: 10px 16px; }
  .brand span { display: none; }
  main { padding: 20px 16px 48px; }
  .poi .label { display: none; }
}
