:root {
  --bg: #1b1128; --panel: #261838; --panel2: #31204a; --line: #47326a; --text: #f3ecff; --muted: #b6a6cf;
  --gold: #e8b21e; --gold2: #f6d26b; --purple: #8b4fd8; --danger: #e0566b; --ok: #4fbf7d;
  --tank: #4a7bd8; --healer: #2fb39a; --melee: #c9474c; --ranged: #9b59d8;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Inter, system-ui, sans-serif; }
a { color: var(--gold2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: "Playfair Display", Georgia, serif; margin: 0 0 .5em; }
h1 { font-size: 30px; } h2 { font-size: 22px; } h3 { font-size: 17px; font-family: Inter, sans-serif; }
.muted { color: var(--muted); } .center { text-align: center; } .small { font-size: 13px; }
.top { display: flex; align-items: center; gap: 18px; padding: 10px 20px; background: linear-gradient(90deg, #2e1748, #4a2275); border-bottom: 2px solid var(--gold); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font: 900 22px "Playfair Display", serif; }
.brand img { width: 40px; height: 40px; }
.brand:hover { text-decoration: none; }
#nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
#nav a { color: var(--text); padding: 6px 12px; border-radius: 8px; font-weight: 600; }
#nav a.on, #nav a:hover { background: rgba(232,178,30,.18); color: var(--gold2); text-decoration: none; }
#who { display: flex; align-items: center; gap: 10px; }
#who img.av { width: 30px; height: 30px; border-radius: 50%; }
main { max-width: 1180px; margin: 24px auto; padding: 0 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 18px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
button, .btn { background: var(--panel2); color: var(--text); border: 1px solid var(--line); padding: 8px 14px; border-radius: 9px; font: 600 14px Inter, sans-serif; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
button:hover, .btn:hover { border-color: var(--gold); text-decoration: none; }
button.primary, .btn.primary { background: var(--gold); color: #2a1a05; border-color: var(--gold); }
button.primary:hover { background: var(--gold2); }
button.danger { color: #fff; background: #7a2433; border-color: var(--danger); }
button.on { background: rgba(232,178,30,.2); border-color: var(--gold); color: var(--gold2); }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { background: #170e22; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: 14px Inter, sans-serif; width: 100%; }
textarea { min-height: 80px; resize: vertical; }
label { display: block; font-weight: 600; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field { margin-bottom: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text); }
.check input { width: auto; }
.emoji { width: 20px; height: 20px; vertical-align: -4px; }
.emoji.big { width: 28px; height: 28px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--panel2); border: 1px solid var(--line); }
.pill.open { color: var(--ok); border-color: var(--ok); } .pill.closed { color: var(--gold2); border-color: var(--gold); } .pill.finished { color: var(--muted); }
/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .dow { text-align: center; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.cal .day { min-height: 96px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px; font-size: 12px; }
.cal .day.other { opacity: .4; } .cal .day.today { border-color: var(--gold); }
.cal .num { font-weight: 700; color: var(--muted); }
.cal .ev { display: block; margin-top: 4px; padding: 3px 6px; border-radius: 6px; background: var(--panel2); border-left: 3px solid var(--gold); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .ev:hover { text-decoration: none; background: #3d2a5c; }
.cal .ev.finished { border-left-color: var(--muted); opacity: .7; }
.list .item { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 10px; background: var(--panel2); margin-bottom: 8px; color: var(--text); }
.list .item:hover { text-decoration: none; outline: 1px solid var(--gold); }
.date-badge { width: 54px; text-align: center; background: #170e22; border-radius: 8px; padding: 4px 0; flex: none; }
.date-badge b { display: block; font-size: 20px; color: var(--gold2); line-height: 1.1; }
.date-badge span { font-size: 11px; text-transform: uppercase; color: var(--muted); }
.counts { display: flex; gap: 10px; flex-wrap: wrap; font-weight: 600; }
.counts span { display: inline-flex; align-items: center; gap: 4px; }
/* roster */
.roster { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.role-col h3 { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
.role-col.tank h3 { border-color: var(--tank); } .role-col.healer h3 { border-color: var(--healer); } .role-col.melee h3 { border-color: var(--melee); } .role-col.ranged h3 { border-color: var(--ranged); }
.player { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 7px; }
.player:hover { background: var(--panel2); }
.player .n { color: var(--muted); font-size: 12px; width: 20px; text-align: right; }
.player .name { font-weight: 600; } .player .spec { color: var(--muted); font-size: 12px; }
.player .note { color: var(--gold2); font-size: 12px; font-style: italic; }
.player .act { margin-left: auto; display: flex; gap: 4px; }
.player .act select { width: auto; padding: 2px 4px; font-size: 12px; }
.player .act button { padding: 2px 7px; font-size: 12px; }
.mine { background: rgba(232,178,30,.12); }
.classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.classes button { justify-content: flex-start; }
/* comp */
.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.group { background: var(--panel2); border: 1px dashed var(--line); border-radius: 10px; padding: 8px; min-height: 190px; }
.group.over, .pool.over { border-color: var(--gold); background: #3d2a5c; }
.group h3 { margin-bottom: 6px; }
.chip { display: flex; align-items: center; gap: 6px; padding: 5px 8px; margin-bottom: 4px; border-radius: 7px; background: #1e1330; border-left: 3px solid var(--line); cursor: grab; font-size: 13px; font-weight: 600; user-select: none; }
.chip.tank { border-left-color: var(--tank); } .chip.healer { border-left-color: var(--healer); } .chip.melee { border-left-color: var(--melee); } .chip.ranged { border-left-color: var(--ranged); }
.pool { display: flex; flex-wrap: wrap; gap: 6px; min-height: 48px; padding: 8px; border: 1px dashed var(--line); border-radius: 10px; }
.pool .chip { margin: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; cursor: pointer; }
.bar { height: 8px; background: #170e22; border-radius: 4px; overflow: hidden; min-width: 80px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--purple), var(--gold)); }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--gold); padding: 10px 18px; border-radius: 10px; z-index: 10; box-shadow: 0 6px 30px #0008; }
#toast.err { border-color: var(--danger); }
.login { max-width: 420px; margin: 60px auto; text-align: center; }
.login img { width: 140px; }
.hero { display: block; width: 100%; max-height: 240px; object-fit: cover; border-radius: 12px; margin-bottom: 14px; }
pre { background: #170e22; padding: 10px; border-radius: 8px; overflow: auto; max-height: 240px; }
@media (max-width: 700px) { .cal .day { min-height: 60px; } .cal .ev { font-size: 10px; } .top { gap: 8px; } }
.banners { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.banner { position: relative; display: block; cursor: pointer; border-radius: 10px; overflow: hidden; border: 2px solid var(--line); margin: 0; color: var(--text); }
.banner input { position: absolute; opacity: 0; }
.banner img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.banner span { display: block; padding: 4px 8px; font-size: 13px; font-weight: 600; background: var(--panel2); }
.banner .none { aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; background: #170e22; color: var(--muted); }
.banner:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.group .buffs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.tag { font-size: 11px; padding: 2px 6px; border-radius: 999px; background: #2a1840; color: var(--gold); border: 1px solid #4a2d6b; }
.checklist { list-style: none; padding: 0; margin: 0; columns: 2; }
.checklist li { padding: 2px 0; break-inside: avoid; }
.checklist li.ok { color: #9fe0a0; }
.checklist li.no { color: var(--muted); }
@media (max-width: 640px) { .checklist { columns: 1; } }
