@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&family=Barlow:wght@400;500;600&display=swap');

:root {
  --bg: #141414;
  --surface: #1e1e1e;
  --surface-2: #282828;
  --ink: #f2ecdd;
  --ink-60: rgba(242, 236, 221, 0.6);
  --ink-45: rgba(242, 236, 221, 0.45);
  --line: rgba(242, 236, 221, 0.18);
  --gold: #e3b341;
  --gold-hi: #ecc25e;
  --red: #d8442e;
  --green: #8fbf9f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Barlow', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.shell { max-width: 640px; margin: 0 auto; padding: 0 20px 48px; }
.shell.wide { max-width: 900px; }

/* Header */
.head { padding: 28px 0 8px; border-bottom: 1px solid var(--line); }
.foot { text-align: center; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.logo { display: inline-block; height: 34px; width: auto; opacity: 0.9; }
.wordmark { font-size: 15px; font-weight: 600; letter-spacing: 0.02em; color: var(--gold); margin: 0; }
.title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: clamp(38px, 9vw, 56px);
  line-height: 0.98;
  margin: 0 0 10px;
}
.title.small { font-size: clamp(30px, 6vw, 40px); }
.eventmeta { font-size: 17px; font-weight: 500; margin: 0 0 8px; }
.sub { font-size: 16px; line-height: 1.5; color: rgba(242, 236, 221, 0.75); margin: 0 0 24px; max-width: 46ch; }

/* Form bits */
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.field label { font-size: 14px; font-weight: 600; }
.input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid rgba(242, 236, 221, 0.25);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  padding: 10px 12px;
}
.input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.input.short { width: 80px; }
.namebar { display: flex; gap: 12px; padding: 20px 0; }

.notice { border-radius: 6px; padding: 10px 14px; font-size: 15px; margin: 0 0 16px; }
.notice.ok { background: rgba(143, 191, 159, 0.15); border: 1px solid rgba(143, 191, 159, 0.5); }
.notice.warn { background: rgba(227, 179, 65, 0.12); border: 1px solid rgba(227, 179, 65, 0.5); }
.notice.err { background: rgba(216, 68, 46, 0.14); border: 1px solid rgba(216, 68, 46, 0.6); }
.notice:empty { display: none; }

/* Buttons */
.btn {
  background: var(--gold);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 20px;
  cursor: pointer;
}
.btn:hover:not(:disabled) { background: var(--gold-hi); }
.btn:disabled { background: rgba(242, 236, 221, 0.2); color: rgba(242, 236, 221, 0.5); cursor: not-allowed; }
.btn.ghost { background: none; border: 1px solid rgba(242, 236, 221, 0.4); color: var(--ink); font-weight: 500; font-size: 14px; padding: 8px 14px; }
.btn.ghost:hover:not(:disabled) { background: none; border-color: var(--ink); }
.btn.danger { border-color: rgba(216, 68, 46, 0.7); color: #e4735f; }
.btn.link { background: none; border: none; color: rgba(242, 236, 221, 0.7); font-weight: 400; font-size: 14px; text-decoration: underline; padding: 4px 0; }
.btn.link:hover:not(:disabled) { background: none; color: var(--ink); }

/* "You're in" banner */
.mine {
  background: var(--surface-2);
  border: 1px solid rgba(227, 179, 65, 0.5);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.mine strong { font-weight: 600; }

/* Activity rows */
.row {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  margin: 0 0 14px;
  overflow: hidden;
}
.row.full { opacity: 0.75; }
.rowbody { display: flex; gap: 16px; padding: 14px 16px 0; }
.thumb {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
}
.rowmain { flex: 1; min-width: 0; }
.rowtop { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.act { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 27px; line-height: 1.05; margin: 0; }
.blurb { font-size: 14px; color: var(--ink-60); margin: 2px 0 10px; }
.left { text-align: right; flex-shrink: 0; }
.leftnum { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 34px; line-height: 1; display: block; }
.row.full .leftnum { color: var(--red); font-size: 26px; letter-spacing: 0.03em; }
.leftlabel { font-size: 13px; color: var(--ink-60); }
.bar { height: 8px; border-radius: 4px; background: rgba(242, 236, 221, 0.14); overflow: hidden; }
.fill { height: 100%; background: var(--gold); border-radius: 4px; transition: width 0.4s ease; }
.row.full .fill { background: var(--red); }
.rowfoot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px 14px; }
.names { margin: 0; padding: 12px 16px 14px; border-top: 1px solid var(--line); columns: 2; column-gap: 24px; }
.names li { font-size: 14px; line-height: 1.7; break-inside: avoid; color: rgba(242, 236, 221, 0.85); margin-left: 18px; }
.names li::marker { color: var(--ink-45); }
.names.empty li { list-style: none; margin-left: 0; color: var(--ink-60); }

/* Landing page code entry */
.codeform { display: flex; gap: 12px; align-items: flex-end; padding: 24px 0 16px; }
.codeform .btn { white-space: nowrap; }
@media (max-width: 520px) { .codeform { flex-direction: column; align-items: stretch; } }

.fine { margin-top: 28px; font-size: 13px; color: var(--ink-45); line-height: 1.5; }
.closed { text-align: center; padding: 60px 0; }

/* Admin */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin: 0 0 16px; }
.card h2 { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 26px; margin: 0 0 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actrow { display: grid; grid-template-columns: 22px 24px 1fr 1.2fr 72px 130px 28px; gap: 10px; align-items: center; margin-bottom: 8px; }
.actrow.dragging { opacity: 0.5; }
.handle { cursor: grab; touch-action: none; user-select: none; color: var(--ink-45); font-size: 18px; line-height: 1; text-align: center; padding: 6px 0; }
select.input { padding: 9px 8px; }
.handle:active { cursor: grabbing; }
.handle:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; border-radius: 4px; color: var(--ink); }
body.noselect, body.noselect * { user-select: none; -webkit-user-select: none; }
.hint { font-size: 12px; color: var(--ink-45); }
.actrow .rm { font-size: 20px; line-height: 1; text-decoration: none; text-align: center; padding: 4px; }
.editbox { margin-top: 14px; padding: 16px; border: 1px solid rgba(227, 179, 65, 0.5); border-radius: 8px; background: var(--surface-2); }
.editbox h3 { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 22px; margin: 0 0 12px; }
.acthead { font-size: 13px; color: var(--ink-60); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; font-size: 13px; color: var(--ink-60); }
td a { color: var(--gold); }
.linkbox { display: flex; gap: 8px; align-items: center; }
.linkbox code { font-family: inherit; font-size: 14px; background: var(--surface-2); padding: 4px 8px; border-radius: 4px; word-break: break-all; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(143,191,159,0.2); color: var(--green); }
.pill.off { background: rgba(216,68,46,0.2); color: #e4735f; }
.detail { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.detail h4 { margin: 8px 0 4px; font-size: 15px; }
.detail ol { margin: 0 0 8px; padding-left: 22px; columns: 2; column-gap: 24px; font-size: 14px; line-height: 1.7; }
.detail ol li { break-inside: avoid; }
.gate { max-width: 360px; margin: 80px auto; }

@media (max-width: 520px) {
  .names, .detail ol { columns: 1; }
  .namebar { flex-direction: column; }
  .grid2 { grid-template-columns: 1fr; }
  .thumb { width: 64px; height: 64px; }
  .actrow { grid-template-columns: 22px 24px 1fr 60px 28px; }
  .actrow .blurbcell, .actrow .imgcell { display: none; }
}
@media (prefers-reduced-motion: reduce) { .fill { transition: none; } }

/* Check-in page */
.ci-head { padding-top: 22px; }
.ci-tools { display: flex; gap: 12px; align-items: center; padding: 16px 0 12px; }
.ci-tools .input { flex: 1; }
.ci-act { padding: 14px 16px; }
.ci-acthead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.ci-acthead h2 { margin: 0 0 2px; }
.ci-act.dim { opacity: 0.4; }
.over { color: #e4735f; }
.people { display: flex; flex-direction: column; }
.person { border-top: 1px solid var(--line); padding: 10px 0; }
.person.in .pname { color: var(--green); }
.person.no .pname { color: var(--ink-60); text-decoration: line-through; }
.person.no .pname .pill { text-decoration: none; }
.prow { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pname { font-size: 16px; font-weight: 500; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pbtns { display: flex; gap: 6px; flex-shrink: 0; }
.pbtns .btn { padding: 8px 14px; font-size: 14px; }
.pbtns .more { padding: 8px 10px; letter-spacing: 0.1em; }
.tag { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gold); border: 1px solid rgba(227,179,65,0.5); border-radius: 4px; padding: 1px 5px; }
.panel { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.prow2 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.prow2 label { font-size: 13px; font-weight: 600; width: 64px; flex-shrink: 0; }
.prow2 .input { flex: 1; min-width: 110px; padding: 8px 10px; font-size: 15px; }
.noshows { opacity: 0.8; }
.addrow { margin-top: 8px; }
.addrow .namebar .btn { align-self: flex-end; }
.sheet { font-family: inherit; line-height: 1.6; resize: vertical; }
@media (max-width: 520px) {
  .prow { align-items: flex-start; }
  .pbtns { flex-direction: column; align-items: stretch; }
}
