:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --alt: #edebe4;
  --ink: #1c1a17;
  --muted: #847f74;
  --accent: #2f6b4f;
  --accent-ink: #ffffff;
  --accent-soft: #e4efe8;
  --border: #e6e3da;
  --danger: #b4432f;
  --danger-bg: #fbeae6;
  --warn: #8a6116;
  --warn-bg: #fbf1dc;
  --orange: #d9741c;
  --orange-bg: #fff4e8;
  --blue: #3a61c9;
  --blue-bg: #e8eefb;
  --shadow: 0 10px 30px rgba(28, 26, 23, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171613;
    --surface: #201f1a;
    --alt: #2a2823;
    --ink: #f3f1ea;
    --muted: #a39e92;
    --accent: #7fbf9a;
    --accent-ink: #171613;
    --accent-soft: #233a2f;
    --border: #353229;
    --danger: #f08a78;
    --danger-bg: #3a221d;
    --warn: #e2b55e;
    --warn-bg: #3a3020;
    --orange: #f09a4a;
    --orange-bg: #3a2a1a;
    --blue: #8fa8f0;
    --blue-bg: #1f2a45;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  }
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    15px/1.5 -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
}
a {
  color: var(--accent);
}
h1,
h2,
h3 {
  letter-spacing: -0.3px;
  line-height: 1.15;
  margin: 0 0 8px;
}
h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 28px;
}
h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
}
h3 {
  font-size: 16px;
  font-weight: 700;
}
p {
  margin: 0 0 12px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}

/* Shell: sidebar on wide screens, top bar + tabs on narrow ones */
.shell {
  display: flex;
  min-height: 100vh;
}
.side {
  width: 220px;
  flex: none;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 20px;
  font-weight: 700;
}
.brand img {
  width: 26px;
  height: 26px;
}
.brand span {
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
  font-family: Georgia, 'Times New Roman', serif;
}
.side-nav {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.side-nav a,
.tabs-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 10px;
}
.side-nav a.on,
.tabs-nav a.on {
  background: var(--accent-soft);
  color: var(--accent);
}
.side-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.account {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  font-size: 13px;
}
.account b {
  display: block;
}
.account span {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.menu {
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}
.menu span {
  display: block;
  /* Safari draws the lines at no width without this (a button as a flex box). */
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.tabs-nav {
  display: flex;
  gap: 4px;
  padding: 10px 16px 0;
  overflow-x: auto;
}
.tabs-nav a {
  padding: 8px 12px;
  white-space: nowrap;
  font-size: 13px;
}
.menu-sheet {
  position: fixed;
  inset: 56px 0 0;
  background: var(--surface);
  z-index: 9;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.menu-sheet a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
  padding: 12px;
  border-radius: 10px;
}
.menu-sheet a.on {
  background: var(--accent-soft);
  color: var(--accent);
}

main {
  width: 100%;
  max-width: 1180px;
  padding: 24px 28px 48px;
}
main.narrow {
  max-width: 480px;
  margin: 0 auto;
  padding-top: 40px;
}
body.auth .shell {
  display: block;
}
body.auth main {
  max-width: 460px;
  margin: 0 auto;
  padding: 48px 16px;
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.page-head p {
  margin: 0;
}
.page-head > div:first-child {
  flex: 1 1 320px;
  min-width: 0;
}
.page-head .controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
}
.card.flat {
  margin: 0;
}
.card > h3 {
  margin-bottom: 2px;
}
.sub {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 10px;
}
.notice {
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: 14px;
}
.notice.info {
  background: var(--accent-soft);
  color: var(--ink);
}
.notice.warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.notice.error {
  background: var(--danger-bg);
  color: var(--danger);
}
.notice a {
  color: inherit;
  font-weight: 600;
}
.grid {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}
.grid > .card {
  margin: 0;
  min-width: 0;
  overflow-x: auto;
}
.g2 {
  grid-template-columns: 1fr 1fr;
}
.g3 {
  grid-template-columns: 1fr 1fr 1fr;
}
.g21 {
  grid-template-columns: 3fr 2fr;
}
.g4 {
  grid-template-columns: repeat(4, 1fr);
}
.g5 {
  grid-template-columns: repeat(5, 1fr);
}
.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.between {
  justify-content: space-between;
}
.grow {
  flex: 1;
  min-width: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 12px;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
.btn:disabled {
  opacity: 0.55;
  cursor: default;
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn.sec {
  background: var(--alt);
  border-color: var(--alt);
}
.btn.danger {
  color: var(--danger);
  border-color: var(--danger);
}
.btn.small {
  padding: 6px 12px;
  font-size: 13px;
}
.btn.block {
  display: flex;
  width: 100%;
}
.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  white-space: nowrap;
}
.pill.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  vertical-align: middle;
}
.tag.ok {
  background: var(--accent-soft);
  color: var(--accent);
}
.tag.warn {
  background: var(--orange-bg);
  color: var(--orange);
}
.tag.info {
  background: var(--blue-bg);
  color: var(--blue);
}
.tag.bad {
  background: var(--danger-bg);
  color: var(--danger);
}
.tag.plain {
  background: var(--alt);
  color: var(--muted);
}
.dd {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  max-width: 100%;
}
select.dd {
  appearance: auto;
  padding-right: 8px;
  max-width: 260px;
  text-overflow: ellipsis;
}
.seg {
  display: inline-flex;
  background: var(--alt);
  border-radius: 12px;
  padding: 3px;
  gap: 2px;
  max-width: 100%;
  overflow-x: auto;
}
.seg button {
  font: inherit;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: 0;
  white-space: nowrap;
  cursor: pointer;
}
.seg button.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Forms */
label.field {
  display: block;
  margin-bottom: 14px;
}
label.field > span,
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}
input[type='text'],
input[type='search'],
input[type='email'],
input[type='password'],
input[type='url'],
input[type='number'],
input[type='date'],
input[type='datetime-local'],
input[type='time'],
select,
textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 44px;
}
textarea {
  min-height: 110px;
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
input[type='checkbox'] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  vertical-align: middle;
  margin-right: 8px;
}
.check {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 14px;
  cursor: pointer;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.three {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.hint {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}
.code-input {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 24px;
  letter-spacing: 6px;
  text-align: center;
}
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  background: var(--alt);
  padding: 4px;
  border-radius: 999px;
}
.tabs button {
  flex: 1;
  font: inherit;
  font-weight: 600;
  background: none;
  border: 0;
  padding: 8px;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
}
.tabs button.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
input[type='file'] {
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  max-width: 100%;
}
.form-foot {
  position: sticky;
  bottom: 0;
  background: var(--bg);
  padding: 12px 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

/* Steps (profile wizard) */
.steps {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
}
.steps b {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.steps b.off {
  background: var(--alt);
  color: var(--muted);
}
.steps span {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.steps span.off {
  color: var(--muted);
}
.steps em {
  flex: 1;
  height: 2px;
  background: var(--border);
}
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.avatar.sm {
  width: 28px;
  height: 28px;
  font-size: 11px;
  background: var(--accent);
  color: var(--accent-ink);
  margin-right: 6px;
  vertical-align: middle;
}

/* Event form with preview */
.form-cols {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 16px;
  align-items: start;
}
.preview-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  max-width: 340px;
}
.preview-cover {
  height: 150px;
  background: var(--alt);
  background-size: cover;
  background-position: center;
  position: relative;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 44px;
}
.preview-cover .tag {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
}
.preview-body {
  padding: 12px;
}
.preview-kicker {
  font-size: 12px;
  color: var(--danger);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.preview-title {
  font-weight: 700;
  font-size: 16px;
  margin: 2px 0;
}
.checklist {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 22px;
}
.checklist li::before {
  content: '○ ';
  color: var(--muted);
}
.checklist li.done::before {
  content: '✓ ';
  color: var(--accent);
}
.checklist li.done {
  color: var(--ink);
}
.checklist li {
  color: var(--muted);
}

/* Events list */
.event {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
}
.event .cover {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 40px;
  font-weight: 700;
  background-size: cover;
  background-position: center;
}
.event h3 {
  margin: 0 0 2px;
}
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--alt);
  color: var(--muted);
  vertical-align: middle;
}
.badge.published {
  background: var(--accent-soft);
  color: var(--accent);
}
.badge.cancelled {
  background: var(--danger-bg);
  color: var(--danger);
}
.numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 4px;
}
.numbers b {
  color: var(--ink);
  font-weight: 700;
}
.event-foot {
  grid-column: 1 / -1;
}
.linkrow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}
.linkrow code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  background: var(--alt);
  padding: 3px 8px;
  border-radius: 8px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.empty {
  text-align: center;
  padding: 48px 16px;
}

/* Numbers and charts */
.kpi .num {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 34px;
  margin: 2px 0 6px;
}
.bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 120px;
}
.bars.short {
  height: 32px;
}
.bars.tiny {
  height: 56px;
  gap: 2px;
}
.bars i {
  flex: 1;
  min-width: 0;
  display: block;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
  position: relative;
  min-height: 0;
}
.bars i.lo {
  opacity: 0.35;
}
.bars i.o {
  background: var(--orange);
}
.bars i.bad {
  background: var(--danger);
}
.bars i:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  white-space: nowrap;
  z-index: 2;
}
.axis {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.legend {
  font-size: 12px;
  color: var(--muted);
}
.legend i {
  display: inline-block;
  width: 10px;
  height: 3px;
  border-radius: 2px;
  vertical-align: middle;
  margin: 0 4px 0 8px;
  background: var(--accent);
}
.legend i.o {
  background: var(--orange);
}
.hbar {
  height: 8px;
  background: var(--alt);
  border-radius: 4px;
  overflow: hidden;
  margin: 4px 0 8px;
}
.hbar i {
  display: block;
  height: 8px;
  background: var(--accent);
  border-radius: 4px;
}
.hbar i.o {
  background: var(--orange);
}
.hbar i.b {
  background: var(--blue);
}
.hbar i.g {
  background: var(--muted);
}
.hrow {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.heat {
  display: grid;
  grid-template-columns: 36px repeat(24, 1fr);
  gap: 2px;
  align-items: center;
}
.heat i {
  height: 13px;
  border-radius: 2px;
  background: var(--accent);
  display: block;
}
.heat span {
  font-size: 11px;
  color: var(--muted);
}
.curve {
  width: 100%;
  height: 120px;
}
.stat {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  margin-right: 22px;
}
.stat .v {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
}
.stat .l {
  font-size: 12px;
  color: var(--muted);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}
td {
  padding: 9px 6px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
td.r,
th.r {
  text-align: right;
}
.insight {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  line-height: 20px;
}
.insight:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.insight .ic {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-size: 16px;
}
.insight .act {
  margin-left: auto;
  flex: none;
}
.inshort {
  padding: 12px 16px;
  font-size: 14px;
}
.card.ai {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-soft), var(--surface) 70%);
}
.card.ai > .row.between {
  flex-wrap: nowrap;
  align-items: flex-start;
}
.card.ai .ic {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 13px;
}
.card.ai input[type='text'] {
  flex: 1;
  min-width: 0;
}
.card .more {
  border-top: 1px solid var(--border);
  margin-top: 14px;
  padding-top: 12px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
}
.card .more a {
  text-decoration: none;
}
.spark {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 40px;
  width: 100%;
}
.spark i {
  flex: 1;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
  opacity: 0.85;
  display: block;
}
.names {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.names li {
  background: var(--alt);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
}
.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  max-width: calc(100vw - 32px);
  z-index: 20;
}
.toast.on {
  opacity: 1;
}

/* Admin dashboard */
.tabs a {
  flex: 1;
  text-align: center;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.tabs a.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.tabs.scroll {
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs.scroll::-webkit-scrollbar {
  display: none;
}
.tabs.scroll a {
  flex: none;
}
.scroll-x {
  overflow-x: auto;
}
.cohort td {
  position: relative;
  white-space: nowrap;
}
.cohort td i.cohort-cell {
  position: absolute;
  inset: 3px 2px;
  background: var(--accent);
  border-radius: 4px;
}
.cohort td span {
  position: relative;
  font-weight: 600;
}
.chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px 0;
}
.msg {
  display: flex;
}
.msg.me {
  justify-content: flex-end;
}
.msg .bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  background: var(--alt);
}
.msg.me .bubble {
  background: var(--accent);
  color: var(--accent-ink);
}
#ai-ask input[type='text'] {
  flex: 1;
  min-width: 0;
}

@media (max-width: 900px) {
  .side {
    display: none;
  }
  .topbar,
  .tabs-nav {
    display: flex;
  }
  main {
    padding: 14px 16px 40px;
  }
  .g2,
  .g3,
  .g21,
  .g4,
  .g5 {
    grid-template-columns: 1fr 1fr;
  }
  .g21,
  .g3 {
    grid-template-columns: 1fr;
  }
  .form-cols {
    grid-template-columns: 1fr;
  }
  .preview-card {
    max-width: none;
  }
  .hide-p {
    display: none !important;
  }
  h1 {
    font-size: 24px;
  }
  .three {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 901px) {
  .topbar,
  .tabs-nav,
  .menu-sheet {
    display: none !important;
  }
}
@media (max-width: 600px) {
  .g2 {
    grid-template-columns: 1fr;
  }
  .page-head .controls {
    justify-content: flex-start;
  }
  select.dd {
    max-width: 100%;
  }
}
@media (max-width: 520px) {
  .two,
  .three {
    grid-template-columns: 1fr;
  }
  .event {
    grid-template-columns: 72px 1fr;
  }
  .event .cover {
    width: 72px;
    height: 72px;
    font-size: 30px;
  }
  .g4,
  .g5 {
    grid-template-columns: 1fr 1fr;
  }
  .heat {
    grid-template-columns: 28px repeat(24, 1fr);
    gap: 1px;
  }
  .heat i {
    height: 9px;
  }
}

/* Costs tab (costs.js): bills and AI use stacked per day, week or month. */
.sbars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 140px;
}
.sbars .sb {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column-reverse;
  position: relative;
}
.sbars .sb i {
  display: block;
  width: 100%;
}
.sbars .sb i.fx {
  background: var(--accent);
  border-radius: 0;
}
.sbars .sb i.ai {
  background: var(--orange);
  border-radius: 3px 3px 0 0;
}
.sbars .sb:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  white-space: nowrap;
  z-index: 2;
}
.nowrap {
  white-space: nowrap;
}
td input.price {
  min-height: 36px;
  padding: 6px 8px;
  max-width: 110px;
  text-align: right;
}
td input.price-model {
  min-height: 36px;
  padding: 6px 8px;
}
tr.muted td {
  opacity: 0.6;
}
tr.bad-row td {
  background: var(--danger-bg);
}
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--danger);
  margin-left: 6px;
  vertical-align: middle;
  animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse {
  50% {
    opacity: 0.25;
  }
}

/* Check-in at the door (tickets.js) */
.ci-result {
  padding: 22px 18px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--muted, inherit);
  font-size: 17px;
  text-align: center;
}
.ci-result b {
  display: block;
  font-size: 22px;
}
.ci-result.ok {
  background: var(--accent);
  color: var(--accent-ink);
}
.ci-result.bad {
  background: var(--danger-bg);
  color: var(--danger);
}

/* Section labels inside a long tab (ticket-stats.js, tickets.js) */
.sec {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  margin: 22px 0 8px;
}

/* Tickets: the setup steps and the Tickets screen (tickets.js) */
.tk-edit {
  grid-template-columns: 1.35fr 1fr;
  align-items: start;
}
.tk-sticky {
  position: sticky;
  top: 16px;
}
.lab {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}
.choices {
  display: flex;
  gap: 10px;
  margin: 12px 0 16px;
}
.choice {
  flex: 1;
  text-align: left;
  font: inherit;
  color: var(--ink);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--surface);
  cursor: pointer;
  white-space: nowrap;
}
.choice.on {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.choice b {
  display: block;
  font-size: 15px;
}
.choice span {
  font-size: 13px;
  color: var(--muted);
}
input.bigin,
.pound input.bigin {
  font-size: 24px;
  font-weight: 800;
  min-height: 56px;
}
.pound {
  position: relative;
  display: block;
}
.pound::before {
  content: '£';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 700;
  pointer-events: none;
}
.pound input {
  padding-left: 26px !important;
  width: 100%;
  box-sizing: border-box;
}
.pound input.bigin {
  padding-left: 32px !important;
}
.receipt {
  background: var(--alt);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
}
.receipt + .receipt {
  margin-top: 10px;
}
.receipt.you {
  background: var(--accent-soft);
}
.receipt.you .lab {
  color: var(--accent);
}
.receipt .hrow {
  border: 0;
  padding: 4px 0;
}
.hrow.tot {
  border-top: 1px dashed var(--border);
  margin-top: 6px;
  padding-top: 8px;
  font-weight: 800;
}
.receipt.you .hrow.tot {
  border: 0;
  margin: 0;
}
.hrow.tot.big span:first-child {
  font-size: 24px;
}
.tk-acc {
  border-top: 1px solid var(--border);
}
.tk-acc-h {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 0;
  font: inherit;
  color: var(--ink);
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}
.tk-acc-h .t {
  flex: 1;
}
.tk-acc-h .t b {
  display: block;
  font-size: 15px;
}
.tk-acc-h .t span {
  font-size: 13px;
  color: var(--muted);
}
.tk-acc-h .sum {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-align: right;
}
.tk-acc-h .chev {
  color: var(--muted);
  width: 14px;
}
.tk-acc.soon .tk-acc-h {
  cursor: default;
  opacity: 0.6;
}
.tk-acc-b {
  padding: 0 0 14px;
}
.tog {
  width: 40px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent);
  position: relative;
  flex: none;
}
.tog::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
}
.tog.off {
  background: #cfcabd;
}
.tog.off::after {
  right: auto;
  left: 3px;
}
.rel-row,
.oth-row {
  display: grid;
  gap: 8px;
  align-items: center;
  padding: 5px 0;
}
.rel-row {
  grid-template-columns: 24px 1.3fr 0.9fr 0.8fr 1.6fr 22px;
}
.oth-row {
  grid-template-columns: 1.4fr 0.9fr 0.8fr 1.1fr 40px;
}
.oth-row.w3 {
  grid-template-columns: 1.4fr 1fr 0.8fr 22px;
}
.rel-row.hd,
.oth-row.hd {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.rel-row input,
.oth-row input {
  min-height: 40px;
  width: 100%;
  box-sizing: border-box;
}
.rel-row .n {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rel-row .opens {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wiz {
  max-width: 520px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 22px;
}
.wdots {
  display: flex;
  gap: 6px;
  margin: 14px 0 22px;
}
.wdots i {
  flex: 1;
  height: 4px;
  border-radius: 9px;
  background: var(--border);
}
.wdots i.on {
  background: var(--accent);
}
.wiz .q {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 6px;
}
.wiz .h {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 18px;
  line-height: 1.45;
}
.wiz input.bigin {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
}
.wopt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--ink);
  border: 1.5px solid var(--border);
  background: var(--surface);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
}
.wopt > span {
  flex: 1;
}
.wopt b {
  display: block;
  font-size: 16px;
}
.wopt span span {
  font-size: 13px;
  color: var(--muted);
}
.wopt.on {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.wopt.soon {
  opacity: 0.55;
  cursor: default;
}
.wopt i {
  width: 20px;
  height: 20px;
  border: 2px solid #cfcabd;
  flex: none;
  box-sizing: border-box;
}
.wopt i.rad {
  border-radius: 50%;
}
.wopt i.box {
  border-radius: 6px;
}
.wopt.on i.rad {
  border: 6px solid var(--accent);
}
.wopt.on i.box {
  background: var(--accent);
  border-color: var(--accent);
}
.wrel {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 14px;
}
.wrel b {
  flex: 1;
}
.wrel .n {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wsum {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 4px 14px;
}
.wsum div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.wsum div:last-child {
  border: 0;
}
.wsum span {
  color: var(--muted);
}
.linkish.block {
  display: block;
  width: 100%;
  text-align: center;
}
@media (max-width: 760px) {
  .tk-edit {
    grid-template-columns: 1fr;
  }
  .tk-sticky {
    position: static;
  }
  .choices {
    flex-direction: column;
  }
  .rel-row {
    grid-template-columns: 22px 1.3fr 1fr 0.9fr;
  }
  .rel-row.hd {
    display: none;
  }
  .rel-row > :nth-child(5) {
    grid-column: 2 / 4;
  }
  .oth-row {
    grid-template-columns: 1fr 1fr;
  }
  .oth-row.hd {
    display: none;
  }
  .oth-row.w3 {
    grid-template-columns: 1.4fr 1fr 0.8fr 22px;
  }
}

/* ---------------------------------------------------------------------------
   Profile (look A: paper, refined) — screenProfile in app.js
   --------------------------------------------------------------------------- */
.pa-kick {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
}
.pa h1 {
  font-size: 40px;
  margin: 6px 0 4px;
  letter-spacing: -0.5px;
}
.pa-lead {
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 16px;
}
.pa-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
  align-items: start;
}
.pa-sec {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 28px;
  padding: 26px 0;
  border-top: 1px solid var(--border);
}
.pa-sec h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 20px;
  margin: 0 0 4px;
}
.pa-sec p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
}
.pa-logo-row {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}
.pa-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 50%;
  background: var(--accent) center / cover no-repeat;
  color: #fff;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
}
.btn.ghost {
  border-color: transparent;
  background: none;
  color: var(--muted);
}
.pa-save {
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.pa-stick {
  position: sticky;
  top: 24px;
}
.pa-card {
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.pa-banner {
  height: 96px;
  background: linear-gradient(135deg, var(--accent), #6fa486 60%, var(--orange));
}
.pa-card-body {
  padding: 16px 18px 18px;
}
.pa-who {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: -40px;
}
.pa-who .pa-logo {
  border: 3px solid var(--surface);
}
.pa-who b {
  display: block;
  font-size: 16px;
  margin-top: 26px;
}
.pa-card-body p {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  margin: 12px 0;
}
.pa-chip {
  display: inline-block;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  margin: 0 6px 6px 0;
}
@media (max-width: 900px) {
  .pa-cols,
  .pa-sec {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .pa-stick {
    position: static;
  }
  .pa h1 {
    font-size: 32px;
  }
}

/* ---------------------------------------------------------------------------
   Event form (look A: paper, refined) — renderForm in app.js
   --------------------------------------------------------------------------- */
.po-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--ink);
  border: 1.5px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: 13px 15px;
  margin-bottom: 8px;
  cursor: pointer;
}
.po-opt > span {
  flex: 1;
}
.po-opt b {
  display: block;
}
.po-opt span span {
  font-size: 13px;
  color: var(--muted);
}
.po-opt i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #cfcabd;
  flex: none;
  box-sizing: border-box;
}
.po-opt.on {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.po-opt.on i {
  border: 6px solid var(--accent);
}
.po-mapcard {
  padding: 0;
  overflow: hidden;
}
.po-map {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: #e7efe6;
  cursor: crosshair;
}
.po-map img {
  position: absolute;
  width: 256px;
  height: 256px;
  user-select: none;
  pointer-events: none;
}
.po-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  border-radius: 50% 50% 50% 0;
  transform: translate(-50%, -100%) rotate(-45deg);
  transform-origin: center;
  margin-top: -2px;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}
.po-zoom {
  position: absolute;
  right: 10px;
  top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.po-zoom button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 0;
  background: #fff;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}
.po-attr {
  position: absolute;
  right: 6px;
  bottom: 4px;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.8);
  padding: 1px 5px;
  border-radius: 4px;
}
.po-map-empty {
  padding: 60px 22px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.ef {
  max-width: 1100px;
}
.ef-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.ef-kick {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
}
.ef-h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 40px;
  margin: 6px 0 4px;
  letter-spacing: -0.5px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.ef-lead {
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 16px;
}
.ef-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
}
.ef-sec {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 28px;
  padding: 26px 0;
  border-top: 1px solid var(--border);
}
.ef-sh h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 20px;
  margin: 0 0 4px;
}
.ef-sh p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
}
.ef-f {
  display: block;
  margin-bottom: 14px;
}
.ef-f > span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  opacity: 0.78;
  margin-bottom: 6px;
}
.ef-f > span i {
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
}
.ef input[type='text'],
.ef input[type='url'],
.ef input[type='number'],
.ef input[type='date'],
.ef input[type='time'],
.ef select,
.ef textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 12px;
  padding: 11px 14px;
  font: inherit;
  font-size: 15px;
  min-height: 46px;
}
.ef textarea.ef-desc {
  min-height: 110px;
  line-height: 1.55;
  resize: vertical;
}
.ef input:focus,
.ef select:focus,
.ef textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}
.ef-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ef-chip {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ef-chip.on {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.ef-photo {
  position: relative;
  height: 160px;
  border-radius: 14px;
  margin-bottom: 14px;
  background: radial-gradient(circle at 25% 35%, #f6c98b 0, #e58b4a 22%, transparent 23%),
    radial-gradient(circle at 70% 60%, #2f6b4f 0, #1f4a36 30%, transparent 31%),
    linear-gradient(135deg, #3b2a4a, #c4573a 55%, #f2b05e);
  background-size: cover;
  background-position: center;
}
.ef-photo-btns {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
}
.ef-pbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid #ddd8cc;
  background: #fff;
  color: #1c1a17;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.ef-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}
.ef-dt {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
}
.ef-dt input {
  min-width: 0;
  padding-left: 10px;
  padding-right: 8px;
}
.ef-tz {
  color: var(--muted);
  font-size: 13px;
}
.ef-tz a {
  color: inherit;
}
.ef-geo {
  margin: -4px 0 12px;
}
.ef-map {
  height: 170px;
  border-radius: 14px;
}
.ef-hint {
  margin-top: 8px;
}
.ef-entry .po-opt {
  padding: 11px 14px;
  margin-bottom: 6px;
}
.ef-note {
  margin: 0 0 14px;
}
.ef-side {
  position: sticky;
  top: 24px;
}
.ef-lbl {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0 0 10px;
}
.ef-lbl2 {
  margin-top: 26px;
}
.ef-card {
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ef-card-pic {
  height: 150px;
  background: radial-gradient(circle at 25% 35%, #f6c98b 0, #e58b4a 22%, transparent 23%),
    radial-gradient(circle at 70% 60%, #2f6b4f 0, #1f4a36 30%, transparent 31%),
    linear-gradient(135deg, #3b2a4a, #c4573a 55%, #f2b05e);
  background-size: cover;
  background-position: center;
}
.ef-card-body {
  padding: 14px 16px 16px;
}
.ef-card-when {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.ef-card-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 19px;
  font-weight: 700;
  margin: 4px 0 2px;
  overflow-wrap: anywhere;
}
.ef-card-meta {
  font-size: 13px;
  color: var(--muted);
}
.ef-chk {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}
.ef-chk li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
}
.ef-chk i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cfcabd;
  box-sizing: border-box;
  flex: none;
}
.ef-chk li.ok i {
  background: var(--accent);
  border-color: var(--accent);
}
.ef-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ef-foot {
  margin: 10px 0 0;
}
@media (max-width: 1000px) {
  .ef-cols {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .ef-side {
    position: static;
    border-top: 1px solid var(--border);
    padding-top: 22px;
  }
  .ef-card {
    max-width: 360px;
  }
}
@media (max-width: 700px) {
  .ef-h1 {
    font-size: 30px;
  }
  .ef-sec {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 22px 0;
  }
  .ef-two {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* "Publish your event now?" after saving tickets (offerPublish in tickets.js) */
.w-from {
  color: var(--accent);
  font-weight: 600;
  font-size: 13.5px;
  margin: 8px 0 0;
}
.pp-wrap {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.pp-dim {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 15, 0.45);
}
.pp-modal {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: var(--bg);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}
.pp-kick {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
}
.pp-modal h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 25px;
  margin: 6px 0 4px;
}
.pp-lead {
  color: var(--muted);
  margin: 0 0 16px;
  font-size: 14.5px;
  line-height: 1.5;
}
.pp-card {
  display: flex;
  gap: 12px;
  background: var(--surface);
  border-radius: 14px;
  padding: 10px;
  box-shadow: var(--shadow);
}
.pp-pic {
  width: 84px;
  height: 84px;
  border-radius: 10px;
  flex: none;
  background: radial-gradient(circle at 25% 35%, #f6c98b 0, #e58b4a 22%, transparent 23%),
    radial-gradient(circle at 70% 60%, #2f6b4f 0, #1f4a36 30%, transparent 31%),
    linear-gradient(135deg, #3b2a4a, #c4573a 55%, #f2b05e);
  background-size: cover;
  background-position: center;
}
.pp-when {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.pp-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  font-size: 17px;
  margin: 3px 0;
  overflow-wrap: anywhere;
}
.pp-meta {
  font-size: 13px;
  color: var(--muted);
}
.pp-chk {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}
.pp-chk li {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  padding: 5px 0;
}
.pp-chk i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cfcabd;
  box-sizing: border-box;
  flex: none;
}
.pp-chk li.ok i {
  background: var(--accent);
  border-color: var(--accent);
}
.pp-note {
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 16px;
}
.pp-acts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pp-acts .btn {
  flex: 1;
  justify-content: center;
}

/* Dayli HQ: Teams (teams.js) */
.tm-crest {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  object-fit: cover;
  flex: none;
}
.tm-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.tm-card {
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.tm-card:hover {
  border-color: var(--accent);
}
.tm-head {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.tm-head h1 {
  margin: 0;
}
.tm-kick {
  font-size: 11px;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--muted);
}
.tm-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  overflow-x: auto;
}
.tm-tabs a {
  padding: 10px 0;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.tm-tabs a.on {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.tm-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 2px;
}
@media (max-width: 900px) {
  .tm-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}
.tm-tile .label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.tm-tile .num {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 26px;
  font-weight: 700;
  margin: 2px 0;
}
.tm-next {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--accent-soft);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
  color: inherit;
  text-decoration: none;
}
.tm-date {
  width: 56px;
  background: var(--surface);
  border-radius: 12px;
  text-align: center;
  padding: 6px 0;
  flex: none;
}
.tm-date .d {
  font-size: 11px;
  font-weight: 800;
  color: var(--danger);
}
.tm-date .n {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  font-weight: 700;
}
.tm-date .m {
  font-size: 11px;
  color: var(--muted);
}
.tm-big {
  font-size: 17px;
}
.tm-avail {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-left: auto;
}
.tm-bar {
  display: flex;
  width: 200px;
  max-width: 100%;
  height: 10px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--alt);
  margin: 6px 0;
}
.tm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.tm-table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
}
.tm-table td {
  padding: 9px 6px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.tm-row {
  cursor: pointer;
}
.tm-row:hover td {
  background: var(--alt);
}
.tm-res {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 800;
  vertical-align: middle;
}
.tm-res.w {
  background: var(--accent-soft);
  color: var(--accent);
}
.tm-res.l {
  background: var(--danger-bg);
  color: var(--danger);
}
.tm-res.d {
  background: var(--alt);
  color: var(--muted);
}
.tm-av {
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--alt);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
}
.tm-tag {
  font-size: 11px;
  font-weight: 800;
  border-radius: 6px;
  padding: 2px 7px;
  background: var(--alt);
  color: var(--muted);
}
.tm-tag.paid {
  background: var(--accent-soft);
  color: var(--accent);
}
.tm-tag.owed {
  background: var(--orange-bg);
  color: var(--orange);
}
.tm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 14px 0 6px;
}
.tm-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
}
.tm-grid label.wide {
  grid-column: 1 / -1;
}
.tm-check {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  margin-top: 8px;
}
.tm-score {
  width: 64px;
  margin-left: 6px;
}
.linkish.danger {
  color: var(--danger);
}
.tm-table select {
  width: auto;
  min-width: 130px;
}

/* Dayli HQ shell (hq.js): welcome steps, switcher, menus, settings */
.ink {
  color: var(--ink);
}
body.hq-bare .side,
body.hq-bare .topbar,
body.hq-bare .tabs-nav {
  display: none !important;
}
body.hq-bare #app {
  max-width: none;
  padding: 0;
}
.hq-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 40px;
  flex-wrap: wrap;
}
.hq-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  font-weight: 700;
}
.hq-brand img {
  width: 32px;
  height: 32px;
}
.hq-brand span,
.brand span.hq {
  color: var(--accent);
  font-size: 15px;
}
.hq-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  flex-wrap: wrap;
}
.hq-st {
  display: flex;
  align-items: center;
  gap: 7px;
}
.hq-st .n {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}
.hq-st.on {
  color: var(--ink);
}
.hq-st.on .n {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.hq-st.done .n {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  color: var(--accent);
}
.hq-line {
  width: 34px;
  height: 2px;
  background: var(--border);
}
.hq-wrap {
  max-width: 1080px;
  margin: 6px auto 40px;
  padding: 0 24px;
  text-align: center;
}
.hq-wrap.hq-left {
  max-width: 860px;
  text-align: left;
}
.hq-h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 42px;
  margin: 0 0 10px;
}
.hq-h1.hq-l {
  font-size: 36px;
}
.hq-h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 28px;
  margin: 0 0 6px;
}
.hq-lead {
  font-size: 18px;
  color: var(--muted);
  margin: 0 0 30px;
}
.hq-lead2 {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 16px;
}
.hq-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  text-align: left;
}
@media (max-width: 900px) {
  .hq-choices {
    grid-template-columns: 1fr;
  }
  .hq-h1 {
    font-size: 32px;
  }
  .hq-top {
    padding: 16px;
  }
}
.hq-ch {
  font: inherit;
  color: inherit;
  text-align: left;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 22px;
  padding: 24px 22px;
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.hq-ch.on {
  border-color: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}
.hq-ch h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 23px;
  margin: 0 0 6px;
}
.hq-ch p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  margin: 0 0 12px;
}
.hq-ch ul {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.9;
}
.hq-ch li::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 9px;
  vertical-align: middle;
}
.hq-ex {
  margin-top: auto;
  font-size: 12px;
  color: var(--muted);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.hq-tick {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hq-ch.on .hq-tick {
  background: var(--accent);
  border-color: var(--accent);
}
.hq-ic {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  flex: none;
}
.hq-ic.sm {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  margin: 0;
}
.hq-stone {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  text-align: left;
  font-size: 15px;
}
.hq-stone svg {
  flex: none;
}
.hq-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.hq-big {
  padding: 13px 28px;
  font-size: 16px;
}
.hq-sec {
  margin-bottom: 30px;
}
.hq-found {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 14px;
}
.hq-found-h {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.hq-tm {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.hq-tm:last-child {
  border-bottom: 0;
}
.hq-ok {
  margin-left: auto;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 3px 8px;
}
.hq-or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin: 10px 0 16px;
}
.hq-or::before,
.hq-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.hq-new label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}
.hq-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 14px;
}
.hq-chips button {
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.hq-chips button.on {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.hq-sws {
  display: flex;
  gap: 10px;
  margin: 6px 0 18px;
}
.hq-sws button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
}
.hq-sws button.on {
  box-shadow:
    0 0 0 3px var(--bg),
    0 0 0 5px var(--ink);
}
.hq-wa {
  background: #25d366;
  color: #fff;
  border-color: #25d366;
}
.hq-cr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #fff;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  flex: none;
}
#hq-switch {
  position: relative;
  margin: 4px 0 14px;
}
.hq-sw {
  font: inherit;
  color: inherit;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  background: var(--bg);
  cursor: pointer;
  text-align: left;
}
.hq-sw b {
  display: block;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hq-sw small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.hq-dd {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  width: 290px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.14);
  padding: 8px;
  z-index: 30;
}
.hq-dd-lb {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.08em;
  padding: 8px 10px 4px;
}
.hq-dd-it {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
}
.hq-dd-it:hover,
.hq-dd-it.on {
  background: var(--alt);
}
.hq-dd-it.on {
  font-weight: 700;
}
.hq-dd-it small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.hq-dd-empty {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 13px;
}
.hq-dd-add {
  display: block;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  padding: 10px;
  border-top: 1px solid var(--border);
  margin-top: 6px;
  text-decoration: none;
}
.hq-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
}
.hq-nav svg,
.tabs-nav svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.tabs-nav svg {
  display: none;
}
.hq-navgap {
  height: 14px;
}
#hq-upsell {
  margin-top: 16px;
}
.hq-up {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  color: var(--muted);
}
.hq-up b {
  display: block;
  color: var(--ink);
  margin-bottom: 2px;
}
.hq-up a {
  color: var(--accent);
  font-weight: 700;
}
.hq-set {
  display: grid;
  gap: 10px;
}
.hq-set-it {
  font: inherit;
  color: inherit;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--surface);
  cursor: pointer;
}
.hq-set-it small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.hq-set-it.on {
  border-color: var(--accent);
}
.hq-toggle {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--alt);
  position: relative;
  flex: none;
}
.hq-toggle span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.hq-set-it.on .hq-toggle {
  background: var(--accent);
}
.hq-set-it.on .hq-toggle span {
  left: 21px;
}
.hq-games .hq-game {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.hq-games .hq-game:last-child {
  border-bottom: 0;
}
.hq-fill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.hq-fillbar {
  width: 100px;
  height: 7px;
  border-radius: 5px;
  background: var(--alt);
  overflow: hidden;
}
.hq-fillbar i {
  display: block;
  height: 100%;
  background: var(--accent);
}
body.hq .side {
  width: 264px;
}
.brand span.hq {
  color: var(--accent);
  font-weight: 700;
}
.hq-sw .grow {
  min-width: 0;
}
.hq-sw small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- HQ team home ------------------------------------------------------------------ */
.th-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.th-head h1 {
  font-family: Georgia, serif;
  font-size: 32px;
  margin: 0;
}
.th-date {
  font-size: 14px;
  font-weight: 600;
}
.th-hero {
  position: relative;
  display: flex;
  gap: 26px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px 24px 22px 30px;
  margin-bottom: 16px;
  overflow: hidden;
}
.th-hero::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--team, var(--accent));
}
.th-hero h2 {
  font-family: Georgia, serif;
  font-size: 34px;
  margin: 4px 0 6px;
}
.th-kick {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--team, var(--accent));
}
.th-empty::before {
  background: var(--accent);
}
.th-counts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 16px 0;
}
.th-counts div {
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--bg);
}
.th-counts b {
  font-family: Georgia, serif;
  font-size: 26px;
  display: block;
}
.th-counts b.g {
  color: var(--accent);
}
.th-counts b.y {
  color: #c79a2c;
}
.th-counts b.r {
  color: var(--danger);
}
.th-counts small {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.th-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.th-wait {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.th-av {
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
  flex: none;
}
.th-ring {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.th-ring > div {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.th-ring b {
  font-family: Georgia, serif;
  font-size: 28px;
}
.th-ring small {
  color: var(--muted);
  font-weight: 700;
}
.th-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.th-tile {
  margin: 0;
}
.th-tile .label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.th-tl {
  display: flex;
  align-items: center;
  gap: 12px;
}
.th-v {
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 700;
}
.th-v.w {
  color: var(--accent);
}
.th-v.l {
  color: var(--danger);
}
.th-v.o {
  color: var(--orange);
}
.th-formrow {
  margin: 4px 0 8px;
}
.th-form {
  display: inline-flex;
  gap: 4px;
}
.th-form i {
  font-style: normal;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
}
.th-form .fw {
  background: var(--accent);
}
.th-form .fd {
  background: #b9b3a5;
}
.th-form .fl {
  background: var(--danger);
}
.act {
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  margin-left: auto;
}
.th-bottom {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 16px;
}
.th-bottom.one {
  grid-template-columns: 1fr;
}
.th-bottom .card {
  margin: 0;
}
.th-bottom h3,
.th-start h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.th-more {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
}
.th-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
}
.th-row:last-child {
  border: 0;
}
.th-dt {
  width: 50px;
  text-align: center;
  background: var(--alt);
  border-radius: 10px;
  padding: 5px 0;
  flex: none;
}
.th-dt .d {
  font-size: 10px;
  font-weight: 800;
  color: var(--danger);
}
.th-dt .n {
  font-family: Georgia, serif;
  font-size: 19px;
  font-weight: 700;
}
.th-mini {
  width: 190px;
  text-align: right;
}
.th-mini .tm-bar {
  margin-top: 4px;
}
.th-todo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.th-todo:last-child {
  border: 0;
}
.th-todo a,
.th-todo .linkish {
  font-weight: 700;
  font-size: 13px;
}
.th-ck {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-size: 12px;
  font-weight: 800;
}
.th-todo.done .th-ck {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.th-todo.done .grow {
  color: var(--muted);
  text-decoration: line-through;
}
@media (max-width: 900px) {
  .th-tiles,
  .th-bottom {
    grid-template-columns: 1fr;
  }
  .th-ring {
    display: none;
  }
  .th-hero h2 {
    font-size: 27px;
  }
  .th-counts {
    grid-template-columns: repeat(2, 1fr);
  }
  .th-wait {
    margin-left: 0;
    width: 100%;
  }
  .th-mini {
    width: 110px;
  }
}

/* --- HQ fixtures & results ------------------------------------------------------- */
.tf-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
  align-items: start;
}
.tf-mh {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.tf-mh h2 {
  font-family: Georgia, serif;
  font-size: 22px;
  margin: 0;
}
.tf-nav {
  margin: 0;
  font-size: 16px;
  padding: 4px 12px;
}
.tf-seg {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  margin-left: auto;
}
.tf-seg a {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
}
.tf-seg a.on {
  background: var(--accent);
  color: var(--accent-ink);
}
.tf-legend {
  display: inline-flex;
  gap: 6px;
}
.tf-legend .tf-pill {
  margin: 0;
}
.tf-cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 8px;
}
.tf-wd {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  padding: 8px;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.06em;
}
.tf-c {
  min-height: 112px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 6px;
  min-width: 0;
}
.tf-c:nth-child(7n) {
  border-right: 0;
}
.tf-n {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tf-c.x .tf-n {
  opacity: 0.45;
}
.tf-c.td .tf-n {
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 50%;
}
.tf-pill {
  display: block;
  border-radius: 7px;
  padding: 4px 6px;
  font-weight: 700;
  margin-bottom: 3px;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}
.tf-pm {
  background: #ede8fb;
  color: #4b3aa0;
}
.tf-pt {
  background: var(--alt);
  color: var(--muted);
}
.tf-pw {
  background: var(--accent-soft);
  color: var(--accent);
}
.tf-pl {
  background: var(--danger-bg);
  color: var(--danger);
}
.tf-pd {
  background: var(--alt);
  color: var(--ink);
}
.tf-res {
  margin: 0;
}
.tf-res h3 {
  display: flex;
  align-items: center;
}
.tf-formrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.tf-wdl {
  margin-left: auto;
}
.tf-r,
.tf-miss {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  font-size: 14px;
}
.tf-r .grow > * {
  display: block;
}
.tf-sc {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 16px;
  width: 52px;
  text-align: center;
  border-radius: 8px;
  padding: 3px 0;
  color: #fff;
  background: #b9b3a5;
  flex: none;
}
.tf-sc.w {
  background: var(--accent);
}
.tf-sc.l {
  background: var(--danger);
}
.tf-miss {
  color: var(--orange);
  font-weight: 700;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .tf-pm {
    background: #2e2850;
    color: #c9bdf7;
  }
}
@media (max-width: 1100px) {
  .tf-grid {
    grid-template-columns: 1fr;
  }
  .tf-legend {
    display: none;
  }
}
@media (max-width: 760px) {
  .tf-c {
    min-height: 70px;
    padding: 3px;
  }
  .tf-pill {
    font-size: 10px;
    padding: 2px 4px;
  }
}

/* --- HQ pick the team ------------------------------------------------------------- */
.th-back {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}
.tp-head h1 .tm-res {
  vertical-align: middle;
  font-size: 14px;
}
.tp-score {
  margin-bottom: 14px;
}
.tp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 470px;
  gap: 14px;
  align-items: start;
}
.tp-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}
.tp-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px;
  min-height: 300px;
  transition: box-shadow 0.15s;
}
.tp-col.over,
.tp-nr.over,
.tp-bench.over,
.tp-spot.over,
.tp-slot.over {
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 4px var(--accent);
}
.tp-col h4 {
  font-size: 13px;
  font-weight: 800;
  margin: 2px 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tp-col h4 i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.tp-empty {
  padding: 6px;
}
.tp-pl {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 6px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
  cursor: pointer;
  user-select: none;
}
.tp-pl:hover {
  background: var(--alt);
}
.tp-pl.start {
  background: var(--accent-soft);
}
.tp-pl.sub {
  background: var(--blue-bg);
}
.tp-pl .grow {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tp-tag {
  font-size: 9px;
  font-weight: 800;
  border-radius: 5px;
  padding: 2px 5px;
  flex: none;
}
.tp-tag.start {
  background: var(--surface);
  color: var(--accent);
}
.tp-tag.sub {
  background: var(--surface);
  color: var(--blue);
}
.tp-tag.free {
  color: var(--muted);
  border: 1px dashed var(--border);
}
.tp-tag.maybe {
  background: var(--orange-bg);
  color: var(--orange);
}
.tp-why {
  font-size: 12px;
  color: var(--muted);
  margin: -2px 6px 8px 37px;
}
.tp-nr {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13px;
}
.tp-nrl {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tp-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: grab;
}
.tp-nudge {
  background: var(--orange-bg);
  color: var(--orange);
  border-color: #f3d9bd;
}
.tp-hint {
  margin-top: 10px;
}
.tp-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.tp-shapes {
  margin-left: 0;
}
.tp-count {
  margin-left: auto;
}
.tp-pitch {
  position: relative;
  aspect-ratio: 470 / 560;
  border-radius: 18px;
  background: repeating-linear-gradient(0deg, #3f8a5e 0 56px, #3a8057 56px 112px);
  overflow: hidden;
}
.tp-pitch .ln {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.55);
}
.tp-pitch .box {
  left: 4%;
  right: 4%;
  top: 3%;
  bottom: 3%;
  border-radius: 6px;
}
.tp-pitch .half {
  left: 4%;
  right: 4%;
  top: 50%;
  height: 0;
  border-width: 2px 0 0;
}
.tp-pitch .circle {
  left: 50%;
  top: 50%;
  width: 22%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.tp-pitch .area {
  left: 25%;
  right: 25%;
  height: 13%;
}
.tp-pitch .area.top {
  top: 3%;
}
.tp-pitch .area.bottom {
  bottom: 3%;
}
.tp-spot {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  border-radius: 12px;
  padding: 2px;
}
.tp-spot .th-av {
  border: 3px solid #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.tp-spot.on .th-av {
  box-shadow: 0 0 0 4px #e3b34a;
}
.tp-spot b {
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  border-radius: 6px;
  padding: 2px 6px;
  white-space: nowrap;
}
.tp-add {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.tp-slots {
  display: grid;
  gap: 6px;
}
.tp-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 14px;
  font-weight: 600;
}
.tp-slot.open {
  border-style: dashed;
}
.tp-slot .n {
  width: 20px;
  font-family: Georgia, serif;
  color: var(--muted);
}
.tp-bench {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 9px 12px;
  font-size: 13px;
}
.tp-sub {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.tp-drop {
  margin-left: auto;
  border: 2px dashed var(--border);
  border-radius: 9px;
  padding: 4px 10px;
  color: var(--muted);
}
.tp-save {
  margin-top: 12px;
  gap: 10px;
}
@media (max-width: 1150px) {
  .tp-grid {
    grid-template-columns: 1fr;
  }
  .tp-right {
    max-width: 520px;
  }
}
@media (max-width: 700px) {
  .tp-cols {
    grid-template-columns: 1fr;
  }
  .tp-col {
    min-height: 0;
  }
}

/* --- HQ squad ------------------------------------------------------------------------ */
.tq-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.tq-list,
.tq-prof {
  margin: 0;
}
.tq-list input[type='search'] {
  width: 100%;
  margin-bottom: 8px;
}
.tq-add {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.tq-add[hidden] {
  display: none;
}
.tq-add input {
  flex: 1;
}
.tq-li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  font-size: 14px;
}
.tq-li[hidden] {
  display: none;
}
.tq-li:hover {
  background: var(--alt);
}
.tq-li.on {
  background: var(--accent-soft);
}
.tq-li .grow b,
.tq-li .grow small {
  display: block;
}
.tq-owes,
.tq-prof .chip {
  font-size: 11px;
  font-weight: 800;
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
}
.tq-owes,
.tq-prof .c-o {
  background: var(--orange-bg);
  color: var(--orange);
}
.tq-prof .c-g {
  background: var(--accent-soft);
  color: var(--accent);
}
.tq-prof .c-n {
  background: var(--alt);
  color: var(--muted);
}
.tq-tip {
  margin-top: 10px;
}
.tq-ph {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.tq-ph h2 {
  font-family: Georgia, serif;
  font-size: 28px;
  margin: 0 0 2px;
}
.tq-kv {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.tq-kv div {
  background: var(--bg);
  border-radius: 12px;
  padding: 10px 12px;
}
.tq-kv b {
  font-family: Georgia, serif;
  font-size: 22px;
  display: block;
}
.tq-kv b.o {
  color: var(--orange);
}
.tq-kv b.g {
  color: var(--accent);
}
.tq-kv small,
.tq-prof .lbl {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.tq-prof .lbl {
  display: block;
  margin-bottom: 6px;
}
.tq-hist {
  display: flex;
  gap: 6px;
  margin: 2px 0 6px;
}
.tq-hist div {
  flex: 1;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
}
.tq-hist i,
.tq-key i {
  display: block;
  height: 26px;
  border-radius: 7px;
  margin-bottom: 4px;
}
.tq-key {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 18px;
}
.tq-key span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.tq-key i {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  margin: 0;
}
i.st {
  background: var(--accent);
}
i.sb {
  background: var(--blue);
}
i.out {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 2px var(--accent);
}
i.no {
  background: var(--danger);
}
i.my {
  background: #e3b34a;
}
i.nr {
  background: var(--alt);
}
.tq-f2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.tq-f2 select,
.tq-f2 input {
  width: 100%;
  margin-bottom: 4px;
}
.tq-pr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.tq-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.tq-del {
  color: var(--danger);
}
@media (max-width: 1000px) {
  .tq-grid,
  .tq-f2 {
    grid-template-columns: 1fr;
  }
  .tq-kv {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- HQ payments ------------------------------------------------------------------- */
.tm-ptabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.tm-ptabs a {
  padding-bottom: 10px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tm-ptabs a.on {
  color: var(--ink);
  box-shadow: inset 0 -3px 0 var(--accent);
}
.tm-paidup {
  font-size: 11px;
  font-weight: 800;
  border-radius: 6px;
  padding: 3px 8px;
  background: var(--alt);
  color: var(--muted);
}
.tm-psum {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.tm-psum > div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.tm-psum b {
  font-family: Georgia, serif;
  font-size: 20px;
  color: var(--ink);
  margin-right: 6px;
}
.tm-psum b.g,
.tm-big b.g {
  color: var(--accent);
}
.tm-psum b.o,
.tm-big b.o {
  color: var(--orange);
}
.tm-pview {
  margin-left: auto;
}
.tm-psum .tp-nudge {
  margin-left: 0;
}
.tm-pfl {
  display: flex;
  gap: 6px;
  margin: 2px 2px 10px;
  flex-wrap: wrap;
}
.tm-pfl a {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.tm-pfl a.on {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.tm-ok {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.tm-big {
  text-align: right;
}
.tm-big small {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.tm-big b {
  font-family: Georgia, serif;
  font-size: 32px;
}
.tm-pacts {
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.tm-auto {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.tm-auto input {
  width: auto;
}
.tm-owe {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--orange-bg);
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.tm-owe .grow b,
.tm-owe .grow small {
  display: block;
}
.tm-owe .act {
  margin-left: 0;
}
.tm-amt {
  font-family: Georgia, serif;
  font-size: 18px;
  color: var(--orange);
}
.tm-nl {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  align-items: center;
  font-size: 13px;
}
.tm-nl i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  flex: none;
}
#tm-pdetail .tq-f2 {
  margin-top: 16px;
}

/* --- HQ social games ------------------------------------------------------------------ */
.sg-games {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.sg-games a {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  background: var(--surface);
}
.sg-games a.on {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.sg-set {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.sg-step {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.sg-step button {
  border: 0;
  background: none;
  padding: 7px 13px;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
}
.sg-step span {
  padding: 7px 14px;
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  min-width: 64px;
  text-align: center;
}
.sg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 470px;
  gap: 16px;
  align-items: start;
}
.sg-list {
  margin: 0;
}
.sg-add {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.sg-add input {
  flex: 1;
}
.sg-it {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 2px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.sg-it b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sg-tag {
  border: 0;
  font-size: 11px;
  font-weight: 800;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  min-width: 82px;
}
.sg-tag.bibs {
  background: #fff3c4;
  color: #8a6116;
}
.sg-tag.colours {
  background: var(--blue-bg);
  color: var(--blue);
}
.sg-tag.none {
  background: var(--alt);
  color: var(--muted);
}
.sg-tick {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  flex: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 14px;
}
.sg-tick.cash {
  background: #8a8475;
  border-color: #8a8475;
}
.sg-tick.card {
  background: var(--accent);
  border-color: var(--accent);
}
.sg-x {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
}
.sg-wait {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  background: var(--warn-bg);
  font-size: 13px;
}
.sg-wait span,
.sg-none span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.sg-wait small {
  flex-basis: 100%;
}
.sg-pay {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  background: var(--bg);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  flex-wrap: wrap;
}
.sg-bar {
  width: 150px;
}
.sg-pay .act {
  margin-left: auto;
}
.sg-pitch {
  position: relative;
  aspect-ratio: 470 / 600;
  border-radius: 20px;
  background: repeating-linear-gradient(0deg, #3f8a5e 0 54px, #3a8057 54px 108px);
  overflow: hidden;
  margin-bottom: 8px;
}
.sg-pitch .ln {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.55);
  pointer-events: none;
}
.sg-pitch .box {
  left: 4%;
  right: 4%;
  top: 3%;
  bottom: 3%;
  border-radius: 6px;
}
.sg-pitch .half {
  left: 4%;
  right: 4%;
  top: 50%;
  height: 0;
  border-width: 2px 0 0;
}
.sg-pitch .circle {
  left: 50%;
  top: 50%;
  width: 20%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.sg-pitch .area {
  left: 30%;
  right: 30%;
  height: 10%;
}
.sg-pitch .area.top {
  top: 3%;
}
.sg-pitch .area.bottom {
  bottom: 3%;
}
/* The team sheet drawn for each sport (sgCourt in hq.js). */
.sg-pitch .ln.half {
  left: 4%;
  right: 4%;
  top: 50%;
  height: 0;
  border-width: 2px 0 0;
}
.sg-pitch .ln.dash {
  border-style: dashed;
}
.sg-pitch .ln.net {
  top: 50%;
  height: 0;
  border-width: 4px 0 0;
  border-color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.sg-pitch .ln.hoop {
  width: 4%;
  aspect-ratio: 1;
  border-radius: 50%;
  border-color: #e4572e;
  border-width: 3px;
  transform: translate(-50%, -50%);
}
.sg-pitch .court-in {
  position: absolute;
  top: 5%;
  bottom: 5%;
  pointer-events: none;
}
.court-basketball {
  background: repeating-linear-gradient(90deg, #d49b62 0 26px, #cc9259 26px 52px);
}
.court-basketball .ln {
  border-color: rgba(255, 255, 255, 0.8);
}
.court-netball {
  background: #2f6f9f;
}
.court-hockey {
  background: repeating-linear-gradient(0deg, #2d63a6 0 54px, #295c9b 54px 108px);
}
.court-tennis {
  background: #4f8c5c;
}
.court-tennis .court-in {
  background: #2f68a5;
}
.court-padel {
  background: #1d4f86;
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.35);
}
.court-padel .court-in {
  background: #2b6cb0;
}
.court-badminton {
  background: #3d6b8f;
}
.court-badminton .court-in {
  background: #3f8a63;
}
.court-volleyball {
  background: #2c6aa0;
}
.court-volleyball .court-in {
  background: #e08a3c;
}
.court-board_games {
  background: repeating-linear-gradient(90deg, #8b5a34 0 34px, #84552f 34px 68px);
}
.court-board_games .board {
  position: absolute;
  left: 18%;
  right: 18%;
  top: 34%;
  bottom: 34%;
  border-radius: 8px;
  background: repeating-conic-gradient(#efe4cf 0 25%, #c9b089 0 50%) 0 0 / 20% 20%;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}
.court-other {
  background: #5d7f70;
}
.sg-sl {
  position: absolute;
  left: 12px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  padding: 3px 8px;
}
.sg-pp {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}
.sg-pp .th-av {
  border: 3px solid #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.sg-pp.b .th-av {
  border-color: #f5c518;
}
.sg-pp b {
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  border-radius: 6px;
  padding: 2px 6px;
  white-space: nowrap;
}
.sg-owe {
  position: absolute;
  top: -4px;
  right: -14px;
  font-style: normal;
  background: var(--orange);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 8px;
  padding: 1px 5px;
}
.sg-none {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 8px;
}
@media (max-width: 700px) {
  .sg-set .muted {
    display: none;
  }
  .sg-set #sg-mix {
    margin-left: auto;
  }
}
@media (max-width: 1150px) {
  .sg-grid {
    grid-template-columns: 1fr;
  }
  .sg-grid > div:last-child {
    order: -1;
    max-width: 520px;
  }
}
.sg-tick,
.sg-tag,
.sg-x,
.sg-step button {
  margin: 0;
}

/* --- HQ social games: card payments ---------------------------------------------------- */
.sg-card {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.sg-card .btn {
  margin: 0;
}
.sg-money {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
}
.sg-money input {
  width: 80px;
  margin: 0;
  padding: 6px 8px;
}
.sg-left {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  background: var(--alt);
  font-size: 13px;
}
.sg-left span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sg-left .act {
  margin: 0;
}

/* --- HQ squad: player links ------------------------------------------------------------ */
.tq-links {
  margin-bottom: 14px;
}
.tq-links-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.tq-links-head h3 {
  margin: 0 0 4px;
}
.tq-links-head p {
  margin: 0;
  max-width: 720px;
}
.tq-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.tq-link b {
  min-width: 200px;
}
.tq-link small {
  font-weight: 500;
}
.tq-link .act,
.tq-links-head .act {
  margin: 0;
}

/* --- HQ on phones: the switcher at the start of the tabs; New game -------------------- */
.hq-tsw {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
  margin: 0 4px 0 0;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  flex: none;
}
.hq-tsw span {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sg-new {
  max-width: 640px;
}
.sg-new input,
.sg-new select {
  width: 100%;
}
.sg-new-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.sg-new-check {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
  font-size: 14px;
}
.sg-new-check input {
  width: auto;
  margin: 0;
}
.hq-dd-add + .hq-dd-add {
  border-top: 0;
  margin-top: 0;
}
.menu-sheet {
  overflow-y: auto;
}
.menu-sheet a svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.menu-sheet a {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --- HQ, phone first ------------------------------------------------------------------- */
/* Sign in and the code: one column, big. */
.hq-auth {
  max-width: 420px;
  margin: 0 auto;
  padding: 10px 0 30px;
  text-align: center;
}
.hq-auth h1 {
  font-size: 30px;
  line-height: 1.15;
  margin: 0 0 8px;
}
.hq-auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 700 30px Georgia, 'Times New Roman', serif;
  margin: 24px 0 22px;
}
.hq-auth-logo img {
  width: 44px;
  height: 44px;
}
.hq-auth-logo span {
  font: 800 15px -apple-system, Arial, sans-serif;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.hq-auth form {
  margin-top: 22px;
  text-align: left;
}
.hq-auth .hq-auth-inp,
.hq-auth .code-input {
  width: 100%;
  box-sizing: border-box;
  font-size: 17px;
  padding: 15px 16px;
  border-radius: 14px;
  margin: 0;
}
.hq-auth .code-input {
  font: 700 30px Georgia, serif;
  letter-spacing: 0.4em;
  text-align: center;
}
.hq-auth .hq-auth-go,
.hq-auth button[type='submit'],
.hq-auth #send {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  border-radius: 14px;
  margin: 12px 0 0;
}
.hq-auth .card {
  text-align: left;
}
.hq-auth-code {
  text-align: left;
}

/* No games yet, New game, Game on. */
.ng {
  max-width: 520px;
  margin: 0 auto;
}
.ng-empty,
.ng-made {
  text-align: center;
}
.ng-empty h1,
.ng-made h1 {
  font-size: 28px;
  margin: 0 0 6px;
}
.ng-art {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--accent-soft);
  margin: 10px auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ng-how {
  text-align: left;
  margin: 16px 0 6px;
}
.ng-how > div {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 9px 0;
}
.ng-how i {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-style: normal;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.ng-how small {
  display: block;
  color: var(--muted);
}
.ng-go {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
  padding: 15px;
  font-size: 16px;
  border-radius: 14px;
  margin: 12px 0 0;
  text-decoration: none;
}
.ng-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.ng-top b {
  font-size: 17px;
}
.ng-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.ng-lbl {
  font-size: 14px;
  font-weight: 800;
  margin: 18px 0 8px;
}
.ng-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ng-chip {
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 14px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  cursor: pointer;
}
.ng-chip.on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.ng-inp {
  width: 100%;
  box-sizing: border-box;
  font-size: 16px;
  padding: 13px 14px;
  border-radius: 14px;
  margin: 8px 0 0;
  -webkit-appearance: none;
  appearance: none;
  min-height: 50px;
}
.ng-chips + .ng-chips {
  margin-top: 8px;
}
.ng-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.ng-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.ng-switch span {
  width: 46px;
  height: 28px;
  border-radius: 14px;
  background: var(--border);
  position: relative;
  flex: none;
  transition: background 0.15s;
}
.ng-switch span:after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.15s;
}
.ng-switch input:checked + span {
  background: var(--accent);
}
.ng-switch input:checked + span:after {
  left: 21px;
}
.ng-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 8px;
}
.ng-step button {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 26px;
  font-weight: 700;
  margin: 0;
  cursor: pointer;
}
.ng-step div {
  text-align: center;
}
.ng-step b {
  display: block;
  font: 700 30px Georgia, serif;
}
.ng-step small {
  color: var(--muted);
  font-weight: 700;
}
.ng-note {
  margin: 6px 0 0;
}
.ng-sum {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 18px;
}
.ng-sum .lbl {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.ng-ok {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--accent);
  margin: 24px auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ng-made .ng-lbl {
  margin-top: 22px;
}
.ng-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1.5px dashed var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 14px;
  text-align: left;
}
.ng-link-box span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ng-link-box button {
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 800;
  margin: 0;
  padding: 4px 6px;
  cursor: pointer;
}
.ng-wa {
  background: #25d366;
  border-color: #25d366;
  color: #fff;
}
.ng-tip {
  text-align: left;
  background: var(--ink);
  color: var(--bg);
  border-radius: 16px;
  padding: 16px;
  margin-top: 20px;
}
.ng-tip ol {
  margin: 8px 0 12px;
  padding-left: 20px;
  line-height: 1.7;
}
.ng-tip .btn {
  margin: 0;
}

/* The bottom bar (phones only). */
.hq-bottom {
  display: none;
}
@media (max-width: 700px) {
  html.hq .hq-bottom {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  html.hq body.auth .hq-bottom,
  html.hq body.hq-bare .hq-bottom {
    display: none;
  }
  .hq-bottom a,
  .hq-bottom button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--muted);
    text-decoration: none;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    background: none;
    border: 0;
    margin: 0;
    padding: 4px 0;
    cursor: pointer;
  }
  .hq-bottom svg {
    width: 24px;
    height: 24px;
  }
  .hq-bottom .on {
    color: var(--accent);
  }
  html.hq main,
  html.hq #app {
    padding-bottom: 90px;
  }
  html.hq .tabs-nav.hq-empty-tabs {
    display: none !important;
  }
  html.hq .topbar .menu {
    display: none;
  }
  /* The game page: the list first, then the pitch; controls stack. */
  html.hq .sg-grid > div:last-child {
    order: 0;
  }
  html.hq .sg-set {
    gap: 10px;
  }
  html.hq .sg-set .muted.small.grow {
    flex-basis: 100%;
    order: 9;
  }
  html.hq .sg-card .muted.small.grow {
    flex-basis: 100%;
  }
  html.hq .th-head {
    flex-wrap: wrap;
    gap: 10px;
  }
  html.hq .th-head .row {
    flex-wrap: wrap;
  }
  /* Welcome: the three cards as compact rows. */
  html.hq .hq-choices {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
  html.hq .hq-ch ul,
  html.hq .hq-ch .hq-ex {
    display: none;
  }
  html.hq .hq-ch {
    display: grid;
    grid-template-columns: 50px 1fr 30px;
    align-items: center;
    text-align: left;
    padding: 14px;
    gap: 2px 12px;
  }
  html.hq .hq-ch .hq-ic {
    grid-row: span 2;
    width: 48px;
    height: 48px;
    margin: 0;
  }
  html.hq .hq-ch h3 {
    margin: 0;
    font-size: 17px;
    grid-column: 2;
  }
  html.hq .hq-ch p {
    margin: 0;
    grid-column: 2;
  }
  html.hq .hq-ch .hq-tick {
    position: static;
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}
select.ng-inp {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23847f74' stroke-width='2.5'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* --- Start a game: past games, sport tiles, rows ---------------------------------------- */
.ng-h {
  font-size: 28px;
  margin: 6px 0 4px;
}
.ng-k {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin: 18px 0 8px;
}
.ng-tpl {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  margin: 0 0 10px;
  cursor: pointer;
}
.ng-tpl.on {
  border: 2px solid var(--accent);
}
.ng-tpl b {
  display: block;
  font-size: 16px;
}
.ng-tpl small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.ng-tpl em {
  display: inline-block;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 7px;
  padding: 2px 7px;
  margin-top: 5px;
}
.ng-tpl i {
  font-style: normal;
  color: var(--muted);
  font-size: 20px;
}
.ng-tpl-ic {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.ng-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ng-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 12px 4px;
  margin: 0;
  cursor: pointer;
}
.ng-tile.on {
  border: 2px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.ng-seg {
  display: flex;
  background: var(--alt);
  border-radius: 12px;
  padding: 3px;
}
.ng-seg button {
  flex: 1;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  padding: 10px 0;
  border-radius: 9px;
  margin: 0;
  cursor: pointer;
}
.ng-seg button.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.ng-rows {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0 14px;
  margin-top: 16px;
}
.ng-row {
  border-bottom: 1px solid var(--border);
}
.ng-row:last-child {
  border-bottom: 0;
}
.ng-row-h,
.ng-switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: none;
  border: 0;
  padding: 14px 0;
  margin: 0;
  text-align: left;
  cursor: pointer;
}
.ng-row-h span,
.ng-switch-row > span.muted {
  width: 82px;
  flex: none;
  font-size: 14.5px;
}
.ng-row-h b,
.ng-switch-row b {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ng-row-h i {
  font-style: normal;
  color: var(--muted);
}
.ng-row-e {
  padding: 0 0 14px;
}
.ng-switch-row .ng-switch {
  margin: 0;
}

/* iPhone Safari zooms in on any box with text under 16px, and on a double tap: neither on phones. */
@media (max-width: 900px) {
  html.hq input,
  html.hq select,
  html.hq textarea {
    font-size: 16px !important;
  }
  html.hq button,
  html.hq a,
  html.hq .btn {
    touch-action: manipulation;
  }
}

/* New game: the kick-off time opens the phone's own time picker. */
.ng-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 8px 8px 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
}
.ng-time input {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  padding: 10px 16px;
  min-width: 120px;
  min-height: 46px;
  text-align: center;
}
.ng-time input::-webkit-date-and-time-value {
  text-align: center;
}
html.hq .ng-time input {
  font-size: 22px !important;
}

/* Loading: the Dayli mark turning (the app's Spinner). */
.loading-screen {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.spin-mark {
  width: 72px;
  height: 72px;
  animation: dayli-turn 1.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
@keyframes dayli-turn {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .spin-mark {
    animation: dayli-pulse 1.4s ease-in-out infinite;
  }
  @keyframes dayli-pulse {
    50% {
      opacity: 0.45;
    }
  }
}

/* --- HQ game page: Invites, Team sheet, Payments --------------------------------------- */
.gm {
  max-width: 980px;
}
.gm-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.gm-head h1 {
  margin: 2px 0 2px;
}
.gm-meta {
  font-size: 14px;
}
.gm-pick select {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  padding: 2px 18px 2px 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23847f74' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  cursor: pointer;
  width: auto;
  max-width: 100%;
  min-height: 0;
  margin: 0;
}
.gm-tools {
  display: flex;
  gap: 8px;
}
.gm-tool {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
}
.gm-tool svg {
  width: 20px;
  height: 20px;
}
.gm-tabs {
  display: flex;
  gap: 6px;
  background: var(--ink);
  border-radius: 18px;
  padding: 6px;
  margin-bottom: 14px;
  max-width: 560px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}
.gm-tabs button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 11.5px;
  font-weight: 800;
  padding: 7px 4px;
  cursor: pointer;
  margin: 0;
}
.gm-tabs button svg {
  width: 19px;
  height: 19px;
}
.gm-tabs button.on {
  background: #fff;
  color: var(--ink);
}
.gm-tabs button.share {
  background: #25d366;
  color: #fff;
}
.gi-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.gi-top b {
  font-size: 15px;
}
.gi-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--border);
  overflow: hidden;
  margin-top: 6px;
}
.gi-bar i {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--accent);
}
.btn.gi-add {
  margin: 0;
  border: 1.5px dashed var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  white-space: nowrap;
}
.gi-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.gi-cols.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.gi-col {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  min-width: 0;
}
.gi-h {
  padding: 8px 10px 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
}
.gi-h b {
  display: block;
  font: 700 22px/1.1 Georgia, serif;
  letter-spacing: 0;
}
.gi-col.yes .gi-h {
  background: var(--accent);
  color: #d6eadd;
}
.gi-col.yes .gi-h b {
  color: #fff;
}
.gi-col.pend .gi-h {
  background: #f3e9d2;
  color: #8a6116;
}
.gi-col.no .gi-h {
  background: var(--alt);
  color: var(--muted);
}
.gi-col.owe .gi-h {
  background: var(--orange-bg);
  color: var(--orange);
}
/* Long lists scroll inside their column. */
.gi-body {
  padding: 2px 6px 6px;
  max-height: 52vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  min-height: 120px;
}
.gi-col.no .gi-it {
  opacity: 0.65;
}
.gi-it {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--alt);
  background: none;
  padding: 7px 2px;
  font: inherit;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  margin: 0;
}
.gi-it:last-child {
  border-bottom: 0;
}
.gi-it span {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.gi-it b {
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gi-it small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gi-empty {
  color: var(--muted);
  font-size: 12.5px;
  padding: 8px 4px;
  margin: 0;
}
.gi-wl {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 2px dashed var(--border);
}
.gi-wl > b {
  font-size: 11px;
  letter-spacing: 0.3px;
  color: var(--orange);
}
.gi-foot {
  border: 0;
  border-top: 1px solid var(--alt);
  background: none;
  padding: 9px 6px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--accent);
  text-align: center;
  margin: 0;
  cursor: pointer;
}
p.gi-foot {
  color: var(--muted);
  cursor: default;
}
.gi-col.owe .gi-foot {
  color: var(--orange);
}
.gi-help,
.gt-help {
  text-align: center;
  margin: 10px 0 0;
}
.gt-pitch {
  max-width: 470px;
  margin: 0 auto 8px;
}
button.sg-pp {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  margin: 0;
}
.sg-free {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.75);
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}
.gt-btns {
  display: flex;
  gap: 8px;
  max-width: 470px;
  margin: 10px auto 0;
}
.gt-btns .btn {
  flex: 1;
  margin: 0;
}

/* Sheets: from the bottom on phones, a panel on wide screens. */
.gs-dim {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 14, 0.4);
  z-index: 60;
}
.gs-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(520px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.18);
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom));
  z-index: 61;
  box-sizing: border-box;
}
.gs-grab {
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: var(--border);
  margin: 0 auto 10px;
}
.gs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 0 10px;
}
.gs-head b {
  font-size: 18px;
}
.gs-head.small {
  margin: 14px 0 4px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.gs-acts p {
  text-align: center;
  margin: 0 0 6px;
}
.gs-act {
  display: block;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--alt);
  background: none;
  padding: 15px 10px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  margin: 0;
}
.gs-act.red {
  color: var(--danger);
}
.gs-act.cancel {
  color: var(--muted);
}
.gs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--alt);
}
.gs-row span:first-child {
  display: flex;
  flex-direction: column;
}
.gs-row small {
  color: var(--muted);
  font-size: 12.5px;
}
.gs-sheet .sg-card {
  margin: 14px 0 0;
}
.btn.gs-wide {
  width: 100%;
  margin: 14px 0 0;
}
.ga-list {
  max-height: 46vh;
  overflow-y: auto;
}
.ga-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--alt);
  background: none;
  padding: 9px 0;
  font: inherit;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  margin: 0;
}
.ga-row span.grow {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ga-row small {
  color: var(--muted);
  font-size: 12.5px;
}
.ga-ck {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 2px solid var(--border);
  flex: none;
  box-sizing: border-box;
}
.ga-row.on .ga-ck {
  background: var(--accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")
    center no-repeat;
  border-color: var(--accent);
}
.ga-row em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 800;
  border-radius: 7px;
  padding: 3px 7px;
  background: var(--alt);
  color: #5d584f;
  flex: none;
}
.ga-row em.app {
  background: var(--accent-soft);
  color: var(--accent);
}
.ga-newbtn {
  display: block;
  width: 100%;
  margin: 8px 0 0;
  border: 1.5px dashed var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 12px;
  padding: 11px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.btn.ga-go {
  width: 100%;
  margin: 12px 0 0;
}
.ga-note {
  text-align: center;
  margin: 8px 0 0;
}
.loading-screen.small {
  min-height: 120px;
}
.loading-screen.small .spin-mark {
  width: 40px;
  height: 40px;
}

@media (max-width: 700px) {
  /* Phones: the tabs float above the bottom bar. */
  html.hq .gm-tabs {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(70px + env(safe-area-inset-bottom));
    margin: 0 auto;
    z-index: 25;
  }
  html.hq .gm {
    padding-bottom: 96px;
  }
  /* Messages above the floating tabs and the bottom bar. */
  html.hq .toast {
    bottom: calc(150px + env(safe-area-inset-bottom));
    z-index: 70;
    max-width: calc(100% - 32px);
    text-align: center;
  }
  .gm-head h1 {
    font-size: 26px;
  }
  .gi-cols {
    gap: 6px;
  }
  .gi-body {
    max-height: 46vh;
    padding: 2px 4px 4px;
  }
  .gi-it {
    gap: 5px;
  }
  .gi-it .th-av {
    width: 22px !important;
    height: 22px !important;
  }
  .gi-top .btn.gi-add {
    padding: 8px 11px;
    font-size: 13px;
  }
}

/* Cost: a price each, or the pitch split. */
.ng-cseg {
  margin: 4px 0 8px;
}
.ng-money {
  position: relative;
  display: block;
  flex: 1;
}
.ng-money span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  margin-top: 4px;
  font-weight: 700;
  color: var(--muted);
  pointer-events: none;
}
.ng-money .ng-inp {
  padding-left: 30px;
}
.gs-cost .gs-row {
  border-bottom: 0;
  padding-bottom: 4px;
}
.gs-cin {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--alt);
}
.gs-cin .btn {
  margin: 0;
  min-height: 50px;
}

/* --- Owed to you (social games): a running tab per person --------------------------------- */
.ow {
  max-width: 720px;
}
.ow h1 {
  margin: 0 0 12px;
}
.ow-total {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.ow-total b {
  display: block;
  font: 700 28px/1.1 Georgia, serif;
  color: var(--orange);
}
.ow-total span {
  color: var(--muted);
  font-size: 14px;
}
.ow-total .btn {
  margin: 0;
}
.ow-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.ow-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--alt);
  color: var(--ink);
  text-decoration: none;
}
.ow-row:last-child {
  border-bottom: 0;
}
.ow-row span.grow {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ow-row b {
  font-size: 17px;
  font-weight: 600;
}
.ow-row small {
  color: var(--muted);
  font-size: 12.5px;
}
.ow-amt {
  text-align: right;
  color: var(--orange);
  flex: none;
}
.ow-amt small {
  display: block;
  color: var(--orange);
  font-size: 12.5px;
}
.ow-amt b {
  font-size: 19px;
  font-weight: 700;
}
.ow-none {
  text-align: center;
  padding: 40px 16px;
}
.ow-none b {
  font: 700 22px Georgia, serif;
}
.ow-back {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 12px;
}
.ow-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.ow-head h1 {
  margin: 0;
}
.ow-owes {
  margin: 2px 0;
  color: var(--orange);
  font-size: 17px;
}
.ow-owes b {
  font-size: 22px;
}
.ow-owes.settled {
  color: var(--accent);
  font-weight: 700;
}
.ow-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.ow-btns .btn {
  margin: 0;
  flex: 1;
}
.ow-h2 {
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.ow-games {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 10px;
}
.ow-game {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--alt);
}
.ow-game:last-child {
  border-bottom: 0;
}
.ow-game a {
  display: flex;
  flex-direction: column;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}
.ow-game small {
  color: var(--muted);
  font-size: 12.5px;
}
.ow-gamt {
  font-weight: 700;
}
.ow-st {
  font-size: 11px;
  font-weight: 800;
  border-radius: 8px;
  padding: 4px 8px;
  white-space: nowrap;
}
.ow-st.owe {
  background: var(--orange-bg);
  color: var(--orange);
}
.ow-st.paid {
  background: var(--accent-soft);
  color: var(--accent);
}
.ow-st.soon {
  background: var(--alt);
  color: var(--muted);
}
.ow-game .act {
  margin: 0;
}

/* Split pitch: the price lock on the Payments tab. */
.gp-lock {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fbf3e2;
  border: 1px solid #efdcb4;
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.gp-lock.on {
  background: var(--accent-soft);
  border-color: var(--border);
}
.gp-lock span.grow {
  display: flex;
  flex-direction: column;
}
.gp-lock small {
  color: var(--muted);
  font-size: 12.5px;
}
.gp-lock .btn {
  margin: 0;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .ow-row {
    padding: 11px 12px;
    gap: 12px;
  }
  .ow-game {
    flex-wrap: wrap;
  }
}

/* --- HQ Games list: coming up, then past games ------------------------------------------- */
.gl {
  max-width: 760px;
}
.gl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.gl-head h1 {
  margin: 0;
}
.gl-head .btn {
  margin: 0;
}
.gl-k {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin: 18px 0 8px;
}
.gl-card {
  position: relative;
  display: flex;
  gap: 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 12px;
  margin-bottom: 10px;
  color: var(--ink);
  text-decoration: none;
}
.gl-card.next {
  border: 2px solid var(--accent);
}
.gl-card span.grow {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.gl-date {
  width: 54px;
  flex: none;
  align-self: flex-start;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  text-align: center;
  padding: 6px 0;
}
.gl-date small {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
}
.gl-date b {
  display: block;
  font: 700 22px/1.1 Georgia, serif;
  color: var(--ink);
}
.gl-date i {
  display: block;
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
}
.gl-t {
  font-size: 16px;
  font-weight: 800;
  padding-right: 64px;
}
.gl-s {
  font-size: 12.5px;
  color: var(--muted);
}
.gl-bar {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  margin: 8px 0 6px;
  overflow: hidden;
}
.gl-bar i {
  display: block;
  height: 6px;
  background: var(--accent);
}
.gl-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.gl-chips span {
  font-size: 11px;
  font-weight: 800;
  border-radius: 7px;
  padding: 3px 7px;
  background: var(--alt);
  color: #5d584f;
}
.gl-chips .g {
  background: var(--accent-soft);
  color: var(--accent);
}
.gl-chips .o {
  background: var(--orange-bg);
  color: var(--orange);
}
.gl-chips .y {
  background: #f3e9d2;
  color: #8a6116;
}
.gl-tag {
  position: absolute;
  right: 12px;
  top: 12px;
  font-size: 10px;
  font-weight: 800;
  border-radius: 7px;
  padding: 3px 7px;
  background: var(--accent);
  color: #fff;
}
.gl-ar {
  color: #c9c4b8;
  font-size: 20px;
  align-self: center;
}
.gl-past {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.gl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--alt);
  color: var(--ink);
  text-decoration: none;
}
.gl-row:last-child {
  border-bottom: 0;
}
.gl-row span.grow {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.gl-row b {
  font-size: 14.5px;
}
.gl-row small {
  font-size: 12px;
  color: var(--muted);
}
.gl-dd {
  width: 40px;
  flex: none;
  text-align: center;
  line-height: 1.05;
}
.gl-dd small {
  font-size: 10px !important;
  font-weight: 800;
}
.gl-dd b {
  display: block;
  font: 700 17px Georgia, serif;
}
.gl-owed,
.gl-paid {
  font-size: 11px;
  font-weight: 800;
  border-radius: 7px;
  padding: 3px 7px;
  white-space: nowrap;
}
.gl-owed {
  color: var(--orange);
  background: var(--orange-bg);
}
.gl-paid {
  color: var(--accent);
  background: var(--accent-soft);
}
.gl-more {
  display: block;
  width: 100%;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 800;
  padding: 14px;
  cursor: pointer;
  margin: 0;
}
.gl-none {
  background: var(--surface);
  border: 1.5px dashed var(--border);
  border-radius: 16px;
  padding: 16px;
  color: var(--muted);
}
.gm-back {
  display: inline-block;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 2px;
}

/* Team sheet: let Dayli choose, the score, mix them up. */
.gt-dayli {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  max-width: 470px;
  margin: 0 auto;
  box-sizing: border-box;
}
.gt-dayli span.grow {
  display: flex;
  flex-direction: column;
}
.gt-dayli b {
  font-size: 15px;
}
.gt-dayli small {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
}
.gt-spark {
  color: var(--accent);
  font-weight: 800;
}
.gt-spark.big {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex: none;
}
.btn.gt-choose {
  display: block;
  width: 100%;
  max-width: 470px;
  margin: 10px auto 12px;
}
.gt-chosen {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
  max-width: 470px;
  margin: 0 auto 10px;
  box-sizing: border-box;
}
.gt-chosen .linkish,
.gt-score .linkish {
  margin: 0;
  font-weight: 800;
}
.gt-mix {
  display: block;
  margin: 14px auto 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  padding: 8px 12px;
}
.gt-score {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fbf3e2;
  border: 1px solid #efdcb4;
  border-radius: 14px;
  padding: 10px 12px;
  max-width: 470px;
  margin: 0 auto 10px;
  box-sizing: border-box;
}
.gt-score.done {
  background: var(--surface);
  border-color: var(--border);
}
.gt-score span.grow {
  display: flex;
  flex-direction: column;
}
.gt-score small {
  color: var(--muted);
  font-size: 12.5px;
}
.gt-score .btn {
  margin: 0;
  white-space: nowrap;
}
.gt-sc {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 4px;
}
.gt-sc > div {
  flex: 1;
  text-align: center;
  border-radius: 16px;
  padding: 10px 6px;
}
.gt-sc .b {
  background: #fff7d6;
  border: 2px solid #f5c518;
}
.gt-sc .c {
  background: var(--blue-bg);
  border: 2px solid var(--blue);
}
.gt-sc small {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.gt-sc span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}
.gt-sc span b {
  font: 700 38px/1 Georgia, serif;
  min-width: 34px;
}
.gt-sc button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  margin: 0;
  padding: 0;
  color: var(--ink);
}
.gt-sc i {
  font: 700 18px Georgia, serif;
  color: var(--muted);
}

/* HQ More: switch what you run, then the account (screenMore in hq.js). */
.hq-ctx {
  display: none;
}
.hq-more {
  max-width: 560px;
  margin: 0 auto;
}
.hq-mo-h {
  font-family: var(--serif, Georgia, serif);
  font-size: 28px;
  margin: 4px 0 12px;
}
.hq-mo-me {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
}
.hq-mo-me b {
  display: block;
  font-size: 15px;
}
.hq-mo-me small {
  color: var(--muted);
  font-size: 13px;
}
.hq-mo-lb {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.7px;
  color: var(--muted);
  margin: 18px 2px 8px;
}
.hq-mo-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.hq-mo-tile {
  position: relative;
  display: block;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  color: inherit;
  text-decoration: none;
  min-height: 104px;
}
.hq-mo-tile.on {
  border: 2px solid var(--accent);
  background: var(--accent-soft, #e4efe8);
}
.hq-mo-tile b {
  display: block;
  font-size: 14.5px;
  margin-top: 10px;
  line-height: 1.2;
}
.hq-mo-tile small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.3;
}
.hq-mo-here {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: 3px 7px;
}
.hq-mo-adds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.hq-mo-adds a {
  border: 1.5px dashed var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  background: var(--surface);
}
.hq-mo-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.hq-mo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: none;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}
.hq-mo-row:last-child {
  border-bottom: 0;
}
.hq-mo-row svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--muted);
}
.hq-mo-row small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.hq-mo-row i {
  font-style: normal;
  color: var(--muted);
  font-size: 18px;
}
.hq-mo-row.out {
  color: #c0392b;
}
.hq-mo-row.out svg {
  color: #c0392b;
}
/* Phones and small tablets (no sidebar): the bottom bar and the "where you
   are" chip replace the menu button and the tabs. */
@media (max-width: 900px) {
  html.hq .hq-bottom {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  html.hq body.auth .hq-bottom,
  html.hq body.hq-bare .hq-bottom {
    display: none;
  }
  html.hq .hq-bottom a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 0;
  }
  html.hq .hq-bottom svg {
    width: 24px;
    height: 24px;
  }
  html.hq .hq-bottom .on {
    color: var(--accent);
  }
  html.hq main,
  html.hq #app {
    padding-bottom: 90px;
  }
  html.hq .tabs-nav.hq-empty-tabs,
  html.hq .topbar .menu {
    display: none !important;
  }
  html.hq .hq-ctx {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    max-width: 55%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px 10px 3px 3px;
    font-size: 13px;
    font-weight: 800;
    color: inherit;
    text-decoration: none;
  }
  html.hq .hq-ctx span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
