:root {
  --bg: #060608;
  --bg-2: #111114;
  --panel: #141417;
  --panel-2: #1b1b1f;
  --card: #18181c;
  --text: #f7f7f8;
  --muted: #b8b8c2;
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(255, 255, 255, .2);
  --accent: #b91c1c;
  --accent-2: #dc2626;
  --accent-dark: #7f1116;
  --gold: #f5c542;
  --gold-soft: rgba(245, 197, 66, .18);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 18px 50px rgba(0, 0, 0, .42);
  /* Layered radius scale (was a flat 8px everywhere) */
  --radius: 12px;
  --radius-sm: 9px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --ease: .16s cubic-bezier(.2, .6, .2, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    linear-gradient(180deg, rgba(185, 28, 28, .13), transparent 260px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, .025) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 32px 32px, 32px 32px, auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(110deg, rgba(185, 28, 28, .08), transparent 28%),
    linear-gradient(250deg, rgba(185, 28, 28, .09), transparent 30%);
  opacity: .58;
}

a {
  color: #f87171;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(260px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(18, 18, 22, .92);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, .12), rgba(0, 0, 0, .38));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 10px 24px rgba(0, 0, 0, .28);
  text-decoration: none;
}

.logo:hover,
.logo:focus-visible {
  border-color: rgba(248, 113, 113, .5);
  background: linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(39, 39, 44, .72));
  outline: none;
  text-decoration: none;
}

.logo img {
  width: 38px;
  height: 46px;
  object-fit: contain;
}

.title {
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
}

.subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.topnav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .075);
  color: #f2f2f4;
  font-size: 13px;
  font-weight: 750;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
}

.topnav a:hover {
  color: var(--text);
  border-color: rgba(248, 113, 113, .38);
  background: rgba(185, 28, 28, .18);
  text-decoration: none;
}

.topnav a[hidden] {
  display: none;
}

.authbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-status {
  max-width: 230px;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.container {
  position: relative;
  width: min(1240px, calc(100% - 28px));
  margin: clamp(16px, 3vw, 28px) auto 56px;
}

.plannerHero {
  position: relative;
  min-height: 190px;
  display: grid;
  align-items: end;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #030303;
  box-shadow: var(--shadow);
}

.plannerHero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: .92;
}

.plannerHero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .10) 58%, rgba(0, 0, 0, .62));
}

.heroCopy {
  position: relative;
  z-index: 1;
  max-width: 560px;
  padding: 22px;
}

.eyebrow {
  color: #fecaca;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.heroCopy h1 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4.2vw, 52px);
  line-height: 1;
  letter-spacing: 0;
}

.plannerBanner {
  min-height: 0;
  display: flex;
  justify-content: center;
  margin-bottom: 0;
  padding: clamp(6px, 1.4vw, 10px);
}

.plannerBanner img {
  position: static;
  display: block;
  width: min(100%, 760px);
  max-width: 100%;
  height: auto;
  object-fit: contain;
  opacity: 1;
}

.plannerBanner::after {
  display: none;
}

.plannerPageHeader {
  display: grid;
  gap: 8px;
  margin: clamp(16px, 3vw, 26px) 0 clamp(18px, 3vw, 30px);
  padding: 0 2px clamp(14px, 2vw, 18px);
  border-bottom: 1px solid var(--line);
}

.plannerPageHeader .eyebrow {
  color: var(--gold);
}

.plannerPageHeader h1 {
  max-width: 920px;
  margin: 0;
  color: var(--text);
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 950;
  line-height: 1.12;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.plannerPageHeader h1:empty {
  display: none;
}

.grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 14px;
}

.card {
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .025));
  box-shadow: var(--shadow);
}

.cardhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.cardhead h2 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.cardActions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

h3 {
  margin: 14px 0 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.muted {
  color: var(--muted);
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  background: rgba(255, 255, 255, .055);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  transition: background var(--ease), border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.btn:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, .09);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 2px solid rgba(248, 113, 113, .6);
  outline-offset: 2px;
}

.btn[disabled] {
  cursor: not-allowed;
  opacity: .52;
}

.btn-primary {
  border-color: rgba(248, 113, 113, .42);
  background: linear-gradient(180deg, #c92a2f, var(--accent));
  color: white;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(185, 28, 28, .28);
}

.btn-primary:hover {
  border-color: rgba(255, 255, 255, .3);
  background: linear-gradient(180deg, #d33a3f, #991b1b);
  box-shadow: 0 12px 28px rgba(185, 28, 28, .38);
}

.btn-danger {
  border-color: rgba(239, 68, 68, .48);
  background: rgba(127, 29, 29, .38);
  color: #fecaca;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  outline: none;
  background: rgba(0, 0, 0, .34);
  color: var(--text);
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(255, 61, 69, .72);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, .18);
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.listitem {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .045);
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
}

.listitem > * {
  min-width: 0;
}

.listitem:hover {
  border-color: rgba(255, 61, 69, .38);
  background: rgba(255, 255, 255, .07);
  transform: translateY(-1px);
}

.listitem .title {
  font-size: 15px;
}

.listitem .meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.wantItem {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px 14px;
  cursor: default;
}

.wantGame {
  min-width: 0;
}

.wantGame .title {
  max-width: 100%;
  color: #ff7a82;
  font-weight: 950;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.wantDetails {
  grid-column: 1;
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.wantBy,
.wantNote {
  min-width: 0;
  overflow-wrap: anywhere;
}

.wantBy span,
.wantNote span {
  display: inline-block;
  margin-right: 5px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.wantNote {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.wantNoteText {
  min-width: 0;
  color: #e7e7ec;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}

.wantActions {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
}

.btn-small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.eventCard {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  border-color: rgba(255, 255, 255, .14);
  border-left: 3px solid var(--gold);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .028)),
    rgba(18, 18, 22, .78);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.eventCard:hover,
.eventCard:focus-visible,
.eventCard:focus-within {
  border-color: rgba(245, 197, 66, .52);
  background:
    linear-gradient(180deg, rgba(245, 197, 66, .10), rgba(255, 255, 255, .035)),
    rgba(23, 23, 28, .9);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .34);
  outline: none;
  transform: translateY(-1px);
}

.eventCardMain {
  flex: 1 1 auto;
  min-width: 0;
}

.eventCardKicker {
  margin-bottom: 7px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.eventCardTitle,
.eventCard .title {
  color: var(--text);
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 950;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.eventCardMeta,
.eventCard .meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.eventCardFooter {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
  flex-wrap: wrap;
}

.plannerEventActions {
  align-self: center;
}

.eventCardAction {
  align-self: center;
  white-space: nowrap;
}

.eventCardStatus {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(248, 113, 113, .34);
  border-radius: var(--radius);
  padding: 4px 8px;
  background: rgba(185, 28, 28, .14);
  color: #fecaca;
  font-size: 12px;
  font-weight: 900;
}

.eventCardStatus.is-live {
  border-color: rgba(34, 197, 94, .35);
  background: rgba(34, 197, 94, .12);
  color: #bbf7d0;
}

.gameMeta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
}

.pastEventItem {
  cursor: default;
}

.pastEventsPanel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.pastEventsLabel {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.eventPill {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 8px;
  background: rgba(255, 255, 255, .055);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.eventPill.is-history {
  border-color: rgba(248, 113, 113, .45);
  background: rgba(185, 28, 28, .18);
  color: #fecaca;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 8px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .75fr);
  gap: 14px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .04);
}

.tables {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.tablecard {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .045);
  transition: border-color var(--ease), background var(--ease);
}

.tablecard:hover {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06);
}

/* Slight cue for tables the signed-in user hosts or has joined */
.tablecard.is-mine {
  border-color: rgba(245, 197, 66, .4);
  box-shadow: inset 3px 0 0 var(--gold);
}

/* Seat capacity bar */
.seats {
  display: grid;
  gap: 5px;
  min-width: 140px;
}

.seatsBar {
  position: relative;
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .1);
  overflow: hidden;
}

.seatsFill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--success), #4ade80);
  transition: width var(--ease), background var(--ease);
}

.seats.is-full .seatsFill {
  background: linear-gradient(90deg, var(--accent-2), #f87171);
}

.tablecard .thumb {
  width: 86px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #050505;
}

.tablecard .thumb img,
.resultThumb img,
.gameHeaderThumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumbph {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, .06);
}

.tablecard .body {
  min-width: 0;
}

.row1,
.row2,
.row3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.row1 .name {
  min-width: 180px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.row1 .time {
  color: #ffb4b8;
  font-size: 13px;
  font-weight: 800;
}

.row2 {
  margin-top: 5px;
  font-size: 13px;
}

.row3 {
  margin-top: 12px;
  justify-content: flex-start;
}

.notes {
  margin-top: 10px;
  padding: 9px 10px;
  border-left: 3px solid var(--accent);
  background: rgba(0, 0, 0, .18);
  color: #e7e7ec;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}

.roster {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, .18);
}

.rosterTopline {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.rosterGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.rosterGroup {
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .035);
}

.rosterGroupHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.rosterCount {
  min-width: 24px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(248, 113, 113, .28);
  border-radius: 999px;
  background: rgba(185, 28, 28, .14);
  color: #fecaca;
  font-size: 12px;
  line-height: 1;
}

.rosterNames {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rosterChip,
.rosterEmpty {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.rosterChip {
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .07);
  color: #f2f2f4;
}

/* The signed-in user's own name, wherever it appears on a card */
.rosterChip.is-you {
  border-color: rgba(245, 197, 66, .55);
  background: var(--gold-soft);
  color: #ffe7a3;
  font-weight: 900;
}

.hostName.is-you {
  color: var(--gold);
  font-weight: 800;
}

.rosterEmpty {
  border: 1px dashed rgba(255, 255, 255, .12);
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, .72);
}

.modalCard {
  width: min(760px, 100%);
  max-height: min(86vh, 920px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(18, 18, 22, .98);
  box-shadow: var(--shadow);
}

.modalHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(185, 28, 28, .10);
}

.modalHead h3 {
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 18px;
}

.modalBody {
  max-height: calc(86vh - 70px);
  overflow: auto;
  padding: 14px;
}

.modalStack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modalRow {
  display: flex;
  gap: 10px;
  align-items: center;
}

.modalActions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.modalGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.fieldSpan2 {
  grid-column: 1 / -1;
}

.field .label {
  margin-bottom: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.field .hint,
.modalHint {
  color: var(--muted);
  font-size: 12px;
}

.modalStatus,
.modalError {
  border-radius: var(--radius);
  padding: 10px 12px;
}

.modalStatus {
  border: 1px solid rgba(34, 197, 94, .28);
  background: rgba(34, 197, 94, .12);
}

.modalError {
  border: 1px solid rgba(239, 68, 68, .34);
  background: rgba(239, 68, 68, .13);
}

.searchResults {
  max-height: 420px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.resultCard {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .05);
  padding: 10px;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
}

.resultCard:hover {
  border-color: rgba(255, 61, 69, .38);
  background: rgba(255, 255, 255, .08);
  transform: translateY(-1px);
}

.resultThumb,
.resultThumb .thumbph {
  width: 60px;
  height: 60px;
  overflow: hidden;
  border-radius: var(--radius);
}

.resultTitle {
  font-weight: 900;
  line-height: 1.2;
}

.resultMeta {
  margin-top: 4px;
  font-size: 12px;
}

.gameHeader {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .045);
}

.gameHeaderThumb,
.gameHeaderThumb .thumbph {
  width: 68px;
  height: 68px;
  overflow: hidden;
  border-radius: var(--radius);
}

.gameHeaderTitle {
  font-size: 16px;
  font-weight: 900;
}

.expBlock .label {
  margin-bottom: 8px;
  font-weight: 900;
}

.expList {
  max-height: 220px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.check input {
  width: auto;
  margin-top: 3px;
}

@media (max-width: 1080px) {
  .topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .topnav {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .authbar {
    justify-content: flex-start;
  }

  .grid,
  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 20px, 1240px);
    margin-top: 10px;
  }

  .topbar {
    padding: 10px;
    gap: 10px;
  }

  .logo {
    width: 42px;
    height: 42px;
  }

  .logo img {
    width: 32px;
    height: 40px;
  }

  .plannerHero {
    min-height: 166px;
  }

  .plannerBanner {
    min-height: 0;
  }

  .plannerPageHeader {
    margin-top: 14px;
  }

  .heroCopy {
    padding: 16px;
  }

  .card {
    padding: 12px;
  }

  .eventCard {
    flex-direction: column;
    gap: 12px;
  }

  .eventCardFooter,
  .eventCardAction {
    width: 100%;
  }

  .eventCardFooter {
    align-items: stretch;
    justify-content: flex-start;
  }

  .eventCardAction {
    justify-content: center;
  }

  .cardhead,
  .cardActions,
  .actions,
  .modalRow,
  .modalActions {
    align-items: stretch;
    flex-direction: column;
  }

  .cardActions {
    width: 100%;
  }

  .cardhead .btn,
  .cardActions .btn,
  .actions .btn,
  .modalActions .btn {
    width: 100%;
  }

  .tablecard {
    grid-template-columns: 72px minmax(0, 1fr);
    padding: 10px;
  }

  .tablecard .thumb {
    width: 72px;
  }

  .row1 .name {
    min-width: 0;
    width: 100%;
  }

  .row3 .btn {
    flex: 1 1 42%;
  }

  .rosterGrid {
    grid-template-columns: 1fr;
  }

  .modal {
    align-items: flex-end;
    padding: 0;
  }

  .modalCard {
    width: 100%;
    max-height: 92vh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .modalGrid {
    grid-template-columns: 1fr;
  }
}

/* -----------------------------
   Toasts (non-blocking feedback)
   ----------------------------- */
.toastHost {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--muted);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  background: rgba(24, 24, 28, .98);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--ease), transform var(--ease);
}

.toast.is-shown {
  opacity: 1;
  transform: translateY(0);
}

.toast-success {
  border-left-color: var(--success);
}

.toast-error {
  border-left-color: var(--danger);
}

.toast-info {
  border-left-color: #60a5fa;
}

@media (max-width: 680px) {
  .toastHost {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }
}
