/* Litsl ticket site. Neutral dark theme, same palette and heading font as the panel. */
@font-face {
    font-family: "Montserrat";
    src: url("/montserrat.woff2") format("woff2");
    font-weight: 500 800;
    font-display: swap;
}

:root {
    --bg: #0c0c0e;
    --surface: #141417;
    --surface-2: #1b1b1f;
    --surface-3: #232328;
    --line: rgba(255, 255, 255, .07);
    --line-strong: rgba(255, 255, 255, .12);
    --text: #ececef;
    --body: #d4d4d8;
    --dim: #a1a1aa;
    --faint: #71717a;
    --link: #8ab4f8;
    --blurple: #5865f2;
    --red: #f87171;
    --amber: #fbbf24;
    --green: #4ade80;
    --blue: #93c5fd;
    --radius: 14px;
    --heading: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(1200px 500px at 50% -200px, rgba(255, 255, 255, .045), transparent 70%),
        var(--bg);
    color: var(--text);
    font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, .brand { font-family: var(--heading); }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px 80px; }
.wrap.narrow { max-width: 820px; }

/* ---------- Top bar ---------- */
.topbar {
    position: sticky; top: 0; z-index: 20;
    background: rgba(12, 12, 14, .8);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.topbar .inner { max-width: 1160px; margin: 0 auto; padding: 0 20px; height: 60px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand .sep { width: 1px; height: 18px; background: var(--line-strong); }
.brand .sub { color: var(--dim); font-weight: 600; }
.nav { display: flex; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 7px; color: var(--dim); padding: 7px 11px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav a.on { color: var(--text); background: var(--surface-3); }
.me { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.chip { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; font-weight: 500; min-width: 0; }
.chip .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--dim); border: 1px solid var(--line); background: transparent; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }

/* Avatars (image or initial) */
.av { width: 40px; height: 40px; border-radius: 50%; flex: none; overflow: hidden; background: var(--surface-3); color: var(--dim); display: grid; place-items: center; font: 600 15px/1 var(--heading); }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av.sm { width: 26px; height: 26px; font-size: 11px; }
.av.xs { width: 22px; height: 22px; font-size: 10px; }

/* ---------- Buttons, pills ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 38px; padding: 0 15px; border-radius: 10px; border: 1px solid var(--line-strong);
    background: var(--surface-2); color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--dim); }
.btn.ghost:hover { color: var(--text); }
.btn.discord { background: var(--blurple); border-color: transparent; color: #fff; height: 46px; padding: 0 22px; font-size: 15px; border-radius: 12px; box-shadow: 0 8px 24px rgba(88, 101, 242, .25); }
.btn.discord:hover { background: #4752c4; }
.btn.discord svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-3); color: var(--dim); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill.plain::before { display: none; }
.pill.blue { background: rgba(147, 197, 253, .1); color: var(--blue); }
.pill.amber { background: rgba(251, 191, 36, .1); color: var(--amber); }
.pill.green { background: rgba(74, 222, 128, .1); color: var(--green); }
.pill.red { background: rgba(248, 113, 113, .1); color: var(--red); }

.badge { display: inline-flex; align-items: center; height: 17px; padding: 0 6px; border-radius: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.badge.player { background: rgba(147, 197, 253, .14); color: var(--blue); }
.badge.staff { background: rgba(74, 222, 128, .12); color: var(--green); }
.badge.bot { background: var(--blurple); color: #fff; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h3 { margin: 0; font-size: 13px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.card-head .count { color: var(--faint); font-size: 13px; }
.muted { color: var(--dim); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); }

/* ---------- Page header ---------- */
.page-head { padding: 32px 0 24px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 24px; }
.page-head .grow { flex: 1 1 320px; min-width: 0; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--faint); margin-bottom: 12px; }
.crumbs a { color: var(--dim); }
.title-row { display: flex; align-items: center; gap: 14px; }
.type-icon { width: 48px; height: 48px; border-radius: 14px; flex: none; display: grid; place-items: center; font-size: 24px; background: var(--surface-2); border: 1px solid var(--line); }
.type-icon.sm { width: 38px; height: 38px; border-radius: 11px; font-size: 18px; }
h1 { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 8px; color: var(--dim); font-size: 14px; }
.meta-row .num { font-family: var(--mono); font-size: 13px; color: var(--faint); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Ticket layout ---------- */
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.ticket-layout aside { position: sticky; top: 80px; display: grid; gap: 16px; }

.facts { margin: 0; padding: 6px 18px 10px; }
.facts div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--faint); font-size: 13px; }
.facts dd { margin: 0; font-size: 14px; font-weight: 500; text-align: right; display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }

details.answers summary { list-style: none; cursor: pointer; }
details.answers summary::-webkit-details-marker { display: none; }
details.answers summary .chev { transition: transform .15s; color: var(--faint); }
details.answers[open] summary .chev { transform: rotate(180deg); }
details.answers:not([open]) .card-head { border-bottom: 0; }
.qa { padding: 6px 18px 16px; }
.qa div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.qa div:last-child { border-bottom: 0; }
.qa dt { font-size: 12px; color: var(--faint); font-weight: 600; margin-bottom: 3px; }
.qa dd { margin: 0; color: var(--body); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Conversation ---------- */
.convo { padding: 8px 0; }
.group { display: flex; gap: 14px; padding: 10px 20px; }
.group:hover { background: rgba(255, 255, 255, .018); }
.group .body { min-width: 0; flex: 1; }
.who-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 2px; }
.who-row .name { font-weight: 600; color: var(--text); }
.who-row.player .name { color: var(--blue); }
.who-row time { font-size: 12px; color: var(--faint); }
.msg { color: var(--body); overflow-wrap: anywhere; }
.msg + .msg { margin-top: 4px; }
.msg .line { min-height: 1.55em; }
.msg .edited { font-size: 11px; color: var(--faint); margin-left: 4px; }
.msg.deleted { border-left: 2px solid rgba(248, 113, 113, .5); padding-left: 10px; }
.msg.deleted .del-tag { display: inline-block; font-size: 11px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.msg.deleted .gone { color: var(--faint); font-style: italic; }
.msg .subtext { font-size: 12.5px; color: var(--faint); }
.msg .h1 { font: 700 20px/1.35 var(--heading); color: var(--text); margin: 6px 0 2px; }
.msg .h2 { font: 700 17px/1.35 var(--heading); color: var(--text); margin: 6px 0 2px; }
.msg .h3 { font: 700 15px/1.35 var(--heading); color: var(--text); margin: 4px 0 2px; }
.msg blockquote { margin: 0; padding-left: 12px; border-left: 3px solid var(--surface-3); color: var(--dim); }
.msg ul { margin: 2px 0; padding-left: 20px; }
.msg strong { color: var(--text); }
.msg code { font-family: var(--mono); font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; }
.msg pre.code { font-family: var(--mono); font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); padding: 10px 12px; border-radius: 8px; overflow-x: auto; margin: 6px 0; white-space: pre; }
.mention { background: rgba(88, 101, 242, .2); color: #c9cdfb; padding: 0 3px; border-radius: 4px; font-weight: 500; }
.spoiler { background: var(--surface-3); color: transparent; border-radius: 4px; cursor: pointer; padding: 0 2px; }
.spoiler.shown, .spoiler:focus { color: inherit; background: rgba(255, 255, 255, .06); }

.event { display: flex; align-items: flex-start; gap: 14px; padding: 8px 20px; color: var(--dim); font-size: 13.5px; }
.event .dot { width: 40px; display: flex; justify-content: center; flex: none; }
.event .dot span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--dim); }
.event .dot svg.i { width: 14px; height: 14px; }
.event.close .dot span { color: var(--red); }
.event.open .dot span { color: var(--green); }
.event.claim .dot span { color: var(--blue); }
.event.flag .dot span { color: var(--amber); }
.event .text { padding-top: 4px; }
.event .text strong { color: var(--text); font-weight: 600; }
.event time { color: var(--faint); font-size: 12px; margin-left: 6px; }
.event .detail { display: block; color: var(--faint); margin-top: 2px; }

.files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.files a.image { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); max-width: 380px; }
.files a.image img { display: block; max-height: 300px; width: auto; }
.files video { max-width: 100%; width: 440px; border-radius: 10px; border: 1px solid var(--line); background: #000; }
.file { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); max-width: 100%; min-width: 0; color: var(--text); }
.file:hover { text-decoration: none; border-color: var(--line-strong); }
.file .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.file .fsize { color: var(--faint); font-size: 12px; flex: none; }
.file.gone { color: var(--faint); font-size: 13px; }

.empty { padding: 56px 20px; text-align: center; color: var(--dim); }
.empty strong { display: block; color: var(--text); font: 700 17px/1.3 var(--heading); margin-bottom: 6px; }

/* ---------- Ticket lists ---------- */
.list { list-style: none; margin: 0; padding: 6px; }
.list a { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 10px; color: var(--text); }
.list a:hover { background: var(--surface-2); text-decoration: none; }
.list .main { flex: 1; min-width: 0; }
.list .t { font-weight: 600; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.list .t .num { font-family: var(--mono); font-size: 12px; color: var(--faint); font-weight: 400; }
.list .snip { color: var(--faint); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.list .side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.list .when { color: var(--faint); font-size: 12px; }
.section-title { font: 700 13px/1 var(--heading); color: var(--dim); text-transform: uppercase; letter-spacing: .08em; margin: 28px 0 12px; display: flex; align-items: center; gap: 8px; }
.section-title .n { color: var(--faint); font-weight: 600; }

/* ---------- Staff queue ---------- */
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.tile .n { font: 700 28px/1 var(--heading); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.tile .l { font-size: 12.5px; color: var(--dim); margin-top: 8px; }
.tile.alert { border-color: rgba(248, 113, 113, .35); background: linear-gradient(180deg, rgba(248, 113, 113, .07), transparent 70%), var(--surface); }
.tile.alert .n { color: var(--red); }

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 900px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, .02); }
tr.waiting td:first-child { box-shadow: inset 3px 0 0 var(--red); }
td.num { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
td.num a { color: var(--text); }
td.age { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--dim); }
.unowned { color: var(--faint); }
.links { display: flex; gap: 6px; justify-content: flex-end; }
.links a { font-size: 13px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); color: var(--dim); }
.links a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.cell-type { display: flex; align-items: center; gap: 8px; white-space: nowrap; }

footer.note { margin-top: 18px; font-size: 12.5px; color: var(--faint); display: flex; gap: 8px; align-items: center; }
.live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(74, 222, 128, .15); }

/* ---------- Landing / errors ---------- */
.hero { min-height: calc(100vh - 60px); display: grid; place-items: center; padding: 40px 0 80px; text-align: center; }
.hero .box { max-width: 460px; }
.hero .logo { width: 84px; height: 84px; border-radius: 22px; margin-bottom: 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.hero h1 { font-size: 32px; margin-bottom: 10px; }
.hero p { color: var(--dim); margin: 0 auto 28px; font-size: 16px; max-width: 380px; }
.perks { margin: 36px auto 0; display: grid; gap: 10px; text-align: left; max-width: 340px; }
.perks div { display: flex; gap: 12px; align-items: center; color: var(--dim); font-size: 14px; }
.perks svg.i { color: var(--faint); width: 18px; height: 18px; }
.hero .code-big { font: 800 64px/1 var(--heading); color: var(--surface-3); margin-bottom: 8px; letter-spacing: -.03em; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .ticket-layout { grid-template-columns: minmax(0, 1fr); }
    .ticket-layout aside { position: static; order: -1; }
    .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .wrap { padding: 0 14px 60px; }
    .topbar .inner { padding: 0 14px; gap: 12px; }
    .brand .sep, .brand .sub, .chip .name, .nav a span { display: none; }
    .chip { padding: 3px; }
    .page-head { padding: 22px 0 18px; }
    h1 { font-size: 21px; }
    .type-icon { width: 42px; height: 42px; font-size: 21px; border-radius: 12px; }
    .group { padding: 10px 14px; gap: 11px; }
    .event { padding: 8px 14px; gap: 11px; }
    .av { width: 34px; height: 34px; }
    .event .dot { width: 34px; }
    .files a.image { max-width: 100%; }
    .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero h1 { font-size: 26px; }
    .list .snip { display: none; }
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
