:root {
  --navy: #14213d;
  --navy-2: #203052;
  --blue: #1557d8;
  --blue-dark: #0b3fae;
  --blue-soft: #e9f1ff;
  --cyan: #0c99a3;
  --lime: #c8ee54;
  --canvas: #f3f6fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #17233b;
  --muted: #68758c;
  --line: #dce3ed;
  --success: #12835d;
  --success-soft: #e4f7ef;
  --warning: #b76a06;
  --warning-soft: #fff1dc;
  --danger: #ce3d52;
  --danger-soft: #ffeaed;
  --shadow: 0 12px 32px rgba(22, 43, 82, 0.09);
  --radius: 8px;
  --font: "Noto Sans HK", "DM Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(21, 87, 216, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(21, 87, 216, 0.035) 1px, transparent 1px),
    var(--canvas);
  background-size: 28px 28px;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

.app-loading {
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
}

.app-loading strong {
  color: var(--blue);
  font-size: 24px;
}

.app-loading span {
  color: var(--muted);
  font-size: 14px;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 68px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 210px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #050706;
  box-shadow: 0 0 0 1px rgba(237, 190, 78, 0.34);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 16px;
  font-weight: 800;
}

.brand-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.desktop-nav {
  display: flex;
  align-self: stretch;
  justify-content: center;
  gap: 4px;
}

.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 17px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.nav-item:hover {
  color: var(--blue);
}

.nav-item.active {
  color: var(--blue);
}

.nav-item.active::after {
  position: absolute;
  right: 16px;
  bottom: -1px;
  left: 16px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--blue);
  content: "";
}

.nav-item svg,
.icon-button svg,
.button svg,
.meta-row svg,
.field-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.account-area {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 210px;
}

.game-category-bar {
  position: sticky;
  z-index: 24;
  top: 68px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 6px 18px rgba(22, 43, 82, 0.055);
  backdrop-filter: blur(14px);
}

.game-category-scroll {
  display: flex;
  width: min(1440px, 100%);
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.game-category-scroll::-webkit-scrollbar {
  display: none;
}

.game-category {
  display: grid;
  flex: 1 0 114px;
  min-width: 114px;
  height: 78px;
  place-content: center;
  justify-items: center;
  gap: 5px;
  padding: 7px 8px 6px;
  border: 0;
  border-right: 1px solid #edf0f5;
  border-bottom: 3px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

.game-category:first-child {
  flex-basis: 96px;
  min-width: 96px;
}

.game-category:hover {
  background: var(--surface-2);
}

.game-category.active {
  border-bottom-color: var(--blue);
  background: var(--blue-soft);
}

.game-logo-frame {
  display: grid;
  width: 92px;
  height: 35px;
  place-items: center;
  padding: 3px;
  border-radius: 4px;
}

.game-logo-frame.dark {
  background: var(--navy);
}

.game-logo {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.game-logo-fallback {
  max-width: 100%;
  overflow: hidden;
  color: currentColor;
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-logo-frame.dark .game-logo-fallback {
  color: #fff;
}

.all-games-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 6px;
  background: var(--navy);
  color: #fff;
}

.game-category.active .all-games-icon {
  background: var(--blue);
}

.game-category-name {
  display: block;
  width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-family: "DM Sans", "Noto Sans HK", sans-serif;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-category.active .game-category-name {
  color: var(--blue-dark);
}

.account-role-badge {
  padding: 4px 7px;
  border-radius: 4px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 9px;
  font-weight: 800;
}

.account-name {
  display: grid;
  max-width: 150px;
  line-height: 1.2;
  text-align: right;
}

.account-name strong,
.account-name small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-name strong {
  color: var(--navy);
  font-size: 11px;
}

.account-name small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.account-logout {
  width: 34px;
  height: 34px;
}

.avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 1px var(--line);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.organizer-avatar {
  background: var(--navy);
}

.live-event-picker.empty {
  align-content: center;
  padding: 10px 13px;
  border: 1px dashed #b8c4d6;
  border-radius: 6px;
  color: var(--muted);
}

.organizer-empty {
  display: grid;
  min-height: 340px;
  place-items: center;
  padding: 38px;
  border: 1px dashed #b7c3d4;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.organizer-empty > div {
  display: grid;
  max-width: 390px;
  justify-items: center;
  gap: 9px;
}

.organizer-empty svg {
  color: var(--blue);
}

.organizer-empty h2 {
  margin: 3px 0 0;
  color: var(--navy);
  font-size: 19px;
}

.organizer-empty p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.management-list {
  display: grid;
  gap: 10px;
}

.management-event-row {
  display: grid;
  grid-template-columns: 62px minmax(250px, 1.4fr) minmax(125px, 0.6fr) minmax(140px, 0.6fr) auto;
  min-height: 94px;
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(22, 43, 82, 0.045);
}

.management-date {
  display: grid;
  width: 54px;
  height: 58px;
  place-content: center;
  border-radius: 6px;
  background: var(--navy);
  color: #fff;
  text-align: center;
  line-height: 1;
}

.management-date strong {
  font-family: "DM Sans", sans-serif;
  font-size: 23px;
}

.management-date span {
  margin-top: 4px;
  color: var(--lime);
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  font-weight: 800;
}

.management-event-info {
  min-width: 0;
}

.management-event-info > span {
  color: var(--blue);
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  font-weight: 800;
}

.management-event-info h2 {
  overflow: hidden;
  margin: 4px 0;
  color: var(--navy);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.management-event-info p {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.management-event-meta {
  display: grid;
  justify-items: start;
  gap: 7px;
}

.management-numbers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.management-numbers > span {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 9px;
}

.management-numbers strong {
  color: var(--navy);
  font-family: "DM Sans", sans-serif;
  font-size: 17px;
}

.management-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.application-summary-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
}

.application-summary-band > div {
  display: grid;
  min-width: 0;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 3px 10px;
}

.application-summary-band > div > span {
  grid-row: 1 / 3;
  padding: 6px 9px;
  border-radius: 5px;
  background: var(--lime);
  color: var(--navy);
  font-size: 10px;
  font-weight: 800;
}

.application-summary-band strong,
.application-summary-band small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.application-summary-band strong {
  font-size: 13px;
}

.application-summary-band small {
  color: #aebbd0;
  font-size: 9px;
}

.application-summary-band .button {
  flex: 0 0 auto;
}

.lottery-review-band {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 10px;
  padding: 12px 15px;
  border: 1px solid #f0d39f;
  border-radius: var(--radius);
  background: var(--warning-soft);
}

.lottery-review-band > div,
.lottery-review-band > div > span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.lottery-review-band > div > span {
  display: grid;
  gap: 2px;
}

.lottery-review-band svg {
  flex: 0 0 auto;
  color: var(--warning);
}

.lottery-review-band strong,
.lottery-review-band small {
  display: block;
}

.lottery-review-band strong {
  color: var(--navy);
  font-size: 11px;
}

.lottery-review-band small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.lottery-publish-clock {
  display: grid !important;
  min-width: 126px !important;
  justify-items: end;
  gap: 1px !important;
  text-align: right;
}

.lottery-publish-clock > span {
  color: var(--warning);
  font-size: 8px;
  font-weight: 800;
}

.lottery-publish-clock time {
  color: var(--navy);
  font-family: "DM Sans", sans-serif;
  font-size: 25px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  line-height: 1.1;
}

.lottery-review-band.pending {
  border-color: #c5d7f4;
  background: var(--blue-soft);
}

.lottery-review-band.pending svg {
  color: var(--blue);
}

.lottery-review-band.published {
  border-color: #bfe2d2;
  background: var(--success-soft);
}

.lottery-review-band.published svg {
  color: var(--success);
}

.lottery-review-band.published > time {
  flex: 0 0 auto;
  color: var(--success);
  font-size: 10px;
  font-weight: 800;
}

.application-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.application-stats > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-right: 1px solid var(--line);
}

.application-stats > div:last-child {
  border-right: 0;
}

.application-stats span {
  color: var(--muted);
  font-size: 10px;
}

.application-stats strong {
  color: var(--navy);
  font-family: "DM Sans", sans-serif;
  font-size: 18px;
}

.application-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  font-size: 11px;
}

.application-table th {
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9px;
  text-align: left;
}

.application-table td {
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
}

.application-table tr:last-child td {
  border-bottom: 0;
}

.application-table td strong,
.application-table td small {
  display: block;
}

.application-table td small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.application-table code {
  color: var(--navy);
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
}

.application-actions {
  display: flex;
  gap: 4px;
}

.application-actions button {
  min-height: 29px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}

.application-actions button.active,
.application-actions button:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.application-actions button:disabled,
.application-actions button:disabled:hover {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.48;
}

.auth-page {
  display: grid;
  grid-template-columns: minmax(380px, 0.9fr) minmax(470px, 1.1fr);
  min-height: 100vh;
  background: var(--surface);
}

.auth-brand-panel {
  position: relative;
  display: grid;
  align-content: space-between;
  overflow: hidden;
  padding: 42px clamp(34px, 5vw, 76px);
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    var(--navy);
  background-size: 34px 34px;
  color: #fff;
}

.auth-brand-panel::after {
  position: absolute;
  right: -90px;
  bottom: -95px;
  width: 310px;
  height: 250px;
  border: 34px solid rgba(200, 238, 84, 0.85);
  border-radius: 50%;
  content: "";
  transform: rotate(-18deg);
}

.auth-brand-lockup,
.auth-mobile-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand-lockup > span:last-child {
  display: grid;
}

.auth-brand-lockup strong {
  font-size: 17px;
}

.auth-brand-lockup .brand-mark {
  width: 54px;
  height: 54px;
}

.auth-brand-lockup small {
  margin-top: 3px;
  color: #aab8d1;
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.auth-brand-copy {
  position: relative;
  z-index: 1;
  max-width: 540px;
}

.auth-brand-copy .eyebrow {
  color: var(--lime);
}

.auth-brand-copy h1 {
  margin: 0;
  font-size: clamp(34px, 4.3vw, 58px);
  line-height: 1.22;
}

.auth-brand-copy > p:last-child {
  max-width: 470px;
  margin: 18px 0 0;
  color: #b8c5d9;
  font-size: 14px;
  line-height: 1.8;
}

.auth-role-preview {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 510px;
  gap: 10px;
}

.auth-role-preview > div {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
}

.auth-role-preview svg {
  width: 21px;
  height: 21px;
  color: var(--lime);
}

.auth-role-preview span {
  display: grid;
  gap: 2px;
}

.auth-role-preview strong {
  font-size: 11px;
}

.auth-role-preview small {
  color: #9faec5;
  font-size: 9px;
}

.auth-form-panel {
  display: grid;
  place-items: center;
  padding: 40px;
  background:
    linear-gradient(90deg, rgba(21, 87, 216, 0.03) 1px, transparent 1px),
    linear-gradient(rgba(21, 87, 216, 0.03) 1px, transparent 1px),
    var(--canvas);
  background-size: 28px 28px;
}

.auth-form-wrap {
  width: min(440px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-mobile-brand {
  display: none;
  margin-bottom: 20px;
  color: var(--navy);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 24px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.auth-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.auth-tabs button.active {
  background: var(--navy);
  color: #fff;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form h2 {
  margin: 0;
  color: var(--navy);
  font-size: 24px;
}

.auth-form > div:first-child p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.auth-submit {
  width: 100%;
}

.form-error {
  min-height: 17px;
  margin: -5px 0 -3px;
  color: var(--danger);
  font-size: 11px;
  font-weight: 700;
}

.signup-role-note {
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--blue-soft);
}

.signup-role-note svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: var(--blue);
}

.signup-role-note span {
  display: grid;
  gap: 2px;
}

.signup-role-note b {
  color: var(--navy);
  font-size: 12px;
}

.signup-role-note small {
  color: var(--muted);
  font-size: 10px;
}

.main-content {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 96px;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 7px;
  color: var(--blue);
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 18px;
  height: 3px;
  background: var(--lime);
  content: "";
}

.page-heading h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
}

.page-heading p {
  max-width: 590px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--blue);
  box-shadow: 0 7px 18px rgba(21, 87, 216, 0.2);
  color: #fff;
}

.button-primary:hover {
  background: var(--blue-dark);
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--navy);
}

.button-quiet {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.button-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
}

.icon-button.danger {
  border-color: #f4cbd1;
  background: var(--danger-soft);
  color: var(--danger);
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat-item {
  position: relative;
  padding: 19px 22px;
}

.stat-item + .stat-item {
  border-left: 1px solid var(--line);
}

.stat-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.stat-item strong {
  display: block;
  margin-top: 5px;
  color: var(--navy);
  font-family: "DM Sans", sans-serif;
  font-size: 23px;
}

.stat-item small {
  color: var(--success);
  font-size: 11px;
  font-weight: 700;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1.8fr) minmax(140px, 0.7fr) auto;
  gap: 10px;
  margin-bottom: 18px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.field-wrap {
  position: relative;
}

.field-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 13px;
  display: flex;
  color: var(--muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.field,
.select-field,
.textarea-field {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 14px;
}

.field {
  padding: 9px 12px 9px 42px;
}

.select-field {
  padding: 9px 34px 9px 12px;
}

.field:focus,
.select-field:focus,
.textarea-field:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21, 87, 216, 0.1);
}

.result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 12px;
}

.result-heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: 18px;
}

.result-heading span {
  color: var(--muted);
  font-size: 13px;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.event-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 5px 18px rgba(22, 43, 82, 0.055);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.event-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.event-visual {
  position: relative;
  height: 142px;
  overflow: hidden;
  background: var(--navy);
}

.event-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.77;
}

.event-visual::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(12, 25, 51, 0.72));
  content: "";
}

.format-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy);
  font-size: 11px;
  font-weight: 800;
}

.format-badge::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  content: "";
}

.format-badge.elimination::before {
  background: var(--danger);
}

.event-date-box {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 11px;
  display: grid;
  width: 46px;
  height: 50px;
  place-content: center;
  border-radius: 6px;
  background: var(--lime);
  color: var(--navy);
  text-align: center;
  line-height: 1;
}

.event-date-box small {
  margin-bottom: 4px;
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  font-weight: 800;
}

.event-date-box strong {
  font-family: "DM Sans", sans-serif;
  font-size: 19px;
}

.event-body {
  padding: 16px;
}

.event-game {
  margin: 0 0 6px;
  color: var(--blue);
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.event-body h3 {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 17px;
  line-height: 1.45;
}

.event-meta {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.meta-row svg {
  flex: 0 0 auto;
  color: #8190aa;
}

.meta-row span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.capacity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: 11px;
}

.capacity-row strong {
  color: var(--ink);
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 4px;
  background: #e7ebf2;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.event-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
}

.status-pill::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-open {
  background: var(--success-soft);
  color: var(--success);
}

.status-soon {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-full {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-waitlist {
  background: #e5f6f7;
  color: #08747b;
}

.card-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.entry-method-tag {
  display: inline-flex;
  width: max-content;
  align-items: center;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  min-height: 280px;
  place-items: center;
  padding: 40px;
  border: 1px dashed #bdc8d8;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.66);
  color: var(--muted);
  text-align: center;
}

.empty-state svg {
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
  color: var(--blue);
}

.ticket-list {
  display: grid;
  gap: 16px;
}

.tournament-ticket {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.ticket-accent {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  background: var(--warning);
}

.tournament-ticket.checked-in .ticket-accent {
  background: var(--success);
}

.ticket-main {
  padding: 23px 26px 24px 30px;
}

.ticket-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.ticket-heading h2 {
  margin: 4px 0 0;
  color: var(--navy);
  font-size: 20px;
}

.ticket-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 24px;
  padding-top: 18px;
}

.ticket-details div {
  display: grid;
  gap: 4px;
}

.ticket-details span,
.ticket-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.ticket-details strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-stub {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 20px;
  border-left: 1px dashed #b9c5d7;
  background: var(--surface-2);
  text-align: center;
}

.ticket-stub::before,
.ticket-stub::after {
  position: absolute;
  left: -9px;
  width: 16px;
  height: 16px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--canvas);
  content: "";
}

.ticket-stub::before {
  top: -9px;
}

.ticket-stub::after {
  bottom: -9px;
}

.ticket-code-mark {
  width: 60px;
  height: 60px;
  border: 7px solid var(--navy);
  background:
    linear-gradient(90deg, var(--navy) 7px, transparent 7px) 7px 7px / 16px 16px,
    linear-gradient(var(--navy) 7px, transparent 7px) 7px 7px / 16px 16px,
    var(--surface);
  box-shadow: inset 0 0 0 5px var(--surface);
}

.ticket-code {
  color: var(--navy);
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
}

.ticket-stub small {
  color: var(--muted);
  font-size: 10px;
}

.ticket-stub .button {
  width: 100%;
  margin-top: 4px;
}

.pairing-page-heading {
  align-items: center;
}

.live-event-picker {
  display: grid;
  width: min(390px, 100%);
  gap: 5px;
}

.live-event-picker > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.live-event-picker .select-field {
  background: var(--surface);
}

.live-tournament-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
  padding: 11px 15px;
  border-radius: 6px;
  background: var(--navy);
  color: #fff;
}

.live-tournament-strip > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.live-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 5px rgba(200, 238, 84, 0.14);
}

.live-tournament-strip strong,
.live-tournament-strip > span {
  font-size: 12px;
}

.live-tournament-strip small {
  overflow: hidden;
  color: #b9c6db;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.own-standing {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.own-standing > div {
  display: grid;
  gap: 3px;
  padding: 12px 16px;
  border-right: 1px solid var(--line);
}

.own-standing > div:last-child {
  border-right: 0;
}

.own-standing span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.own-standing strong {
  color: var(--navy);
  font-size: 15px;
}

.own-standing > div:first-child strong {
  color: var(--blue);
  font-family: "DM Sans", sans-serif;
  font-size: 22px;
}

.current-pairing {
  display: grid;
  grid-template-columns: 90px 130px minmax(0, 1fr) 160px;
  min-height: 132px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #b9d0fb;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.pairing-live-label {
  align-self: stretch;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.pairing-live-label span {
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--lime);
  color: var(--navy);
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  font-weight: 800;
}

.table-number {
  display: grid;
  place-content: center;
  justify-items: center;
  align-self: stretch;
  border-right: 1px solid var(--line);
  background: var(--blue-soft);
  color: var(--muted);
  font-size: 10px;
}

.table-number strong {
  color: var(--blue-dark);
  font-family: "DM Sans", sans-serif;
  font-size: 48px;
  line-height: 1;
}

.table-number small {
  color: var(--blue-dark);
  font-weight: 800;
}

.current-opponent {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 20px 26px;
}

.current-opponent span,
.round-clock > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.current-opponent strong {
  color: var(--navy);
  font-size: 21px;
}

.current-opponent small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.current-opponent .opponent-rank {
  color: var(--blue-dark);
  font-weight: 700;
}

.round-clock {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-right: 22px;
  padding: 12px;
  border-radius: 6px;
  background: var(--warning-soft);
  color: var(--warning);
}

.round-clock svg {
  width: 20px;
  height: 20px;
}

.round-clock span {
  display: grid;
  gap: 1px;
}

.round-clock strong {
  color: var(--warning);
  font-family: "DM Sans", sans-serif;
  font-size: 17px;
}

.current-pairing.waiting {
  grid-template-columns: 1fr;
  place-items: center;
  padding: 30px;
  color: var(--muted);
}

.current-pairing.waiting > div {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.player-result-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 10px;
  padding: 13px 15px;
  border: 1px solid #b9d0fb;
  border-radius: var(--radius);
  background: var(--blue-soft);
}

.player-result-panel > div:first-child {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--blue-dark);
}

.player-result-panel > div:first-child span {
  display: grid;
  gap: 3px;
}

.player-result-panel strong {
  color: var(--navy);
  font-size: 13px;
}

.player-result-panel small {
  color: var(--muted);
  font-size: 10px;
}

.player-result-panel.is-disputed {
  border-color: #f4cbd1;
  background: var(--danger-soft);
}

.player-result-choices,
.player-result-confirmation {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.player-result-choices button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 11px;
  border: 1px solid #b9d0fb;
  border-radius: 6px;
  background: var(--surface);
  color: var(--blue-dark);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.section-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 30px 0 11px;
}

.section-toolbar > div > span {
  color: var(--blue);
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  font-weight: 800;
}

.section-toolbar h2 {
  margin: 2px 0 0;
  color: var(--navy);
  font-size: 18px;
}

.section-toolbar small {
  color: var(--muted);
  font-size: 11px;
}

.pairing-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.pairing-row {
  display: grid;
  grid-template-columns: 72px minmax(140px, 1fr) 58px minmax(140px, 1fr) 82px;
  min-height: 62px;
  align-items: center;
  gap: 12px;
  padding: 8px 15px;
  border-bottom: 1px solid var(--line);
}

.pairing-row:last-child {
  border-bottom: 0;
}

.pairing-row.is-mine {
  background: var(--blue-soft);
  box-shadow: inset 4px 0 var(--blue);
}

.pairing-table-number {
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  font-weight: 800;
}

.pairing-player {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.pairing-player.right {
  text-align: right;
}

.pairing-player strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pairing-player small {
  color: var(--muted);
  font-size: 9px;
}

.pairing-player.winner strong {
  color: var(--success);
}

.pairing-score {
  color: var(--navy);
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.match-state {
  justify-self: end;
  padding: 4px 7px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
}

.match-state.pending {
  background: var(--warning-soft);
  color: var(--warning);
}

.match-state.complete {
  background: var(--success-soft);
  color: var(--success);
}

.match-state.report-pending {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.match-state.disputed {
  background: var(--danger-soft);
  color: var(--danger);
}

.table-shell {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.standings-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 12px;
}

.standings-table th {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9px;
  text-align: left;
  text-transform: uppercase;
}

.standings-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
}

.standings-table tr:last-child td {
  border-bottom: 0;
}

.standings-table tr.is-mine td {
  background: var(--blue-soft);
}

.standings-table td:nth-child(n + 3),
.standings-table th:nth-child(n + 3) {
  text-align: center;
}

.standings-table td strong,
.standings-table td small {
  display: block;
}

.standings-table td small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.standings-table td b {
  color: var(--blue);
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
}

.rank-badge {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--navy);
  font-family: "DM Sans", sans-serif;
  font-weight: 800;
}

.bracket-scroll {
  overflow-x: auto;
  padding: 2px 0 14px;
}

.bracket {
  display: grid;
  grid-template-columns: repeat(var(--rounds), minmax(235px, 1fr));
  min-width: calc(var(--rounds) * 250px);
  gap: 18px;
}

.bracket-round {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
}

.bracket-round > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3px;
}

.bracket-round > header span {
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  font-weight: 800;
}

.bracket-round > header strong {
  color: var(--navy);
  font-size: 12px;
}

.bracket-matches {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 12px;
}

.bracket-match {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(22, 43, 82, 0.05);
}

.bracket-match.is-mine {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(21, 87, 216, 0.12);
}

.third-place-round .bracket-match {
  border-color: #b9c9e8;
  background: var(--blue-soft);
}

.third-place-round > header strong {
  color: var(--blue-dark);
}

.bracket-match-id {
  display: block;
  padding: 4px 9px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
  font-size: 8px;
  font-weight: 800;
}

.competitor {
  display: grid;
  grid-template-columns: 22px 1fr 16px;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-bottom: 1px solid var(--line);
}

.competitor:last-child {
  border-bottom: 0;
}

.competitor > span {
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
}

.competitor strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.competitor.winner {
  background: var(--success-soft);
  color: var(--success);
}

.competitor svg {
  color: var(--success);
}

.organizer-event-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 6px;
  background: var(--navy);
  color: #fff;
}

.organizer-event-band > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.organizer-event-band span,
.organizer-event-band b {
  font-size: 11px;
}

.organizer-event-band strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-event-band b {
  flex: 0 0 auto;
  color: var(--lime);
}

.organizer-stats .text-stat {
  font-family: var(--font);
  font-size: 18px;
}

.organizer-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.control-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 5px 18px rgba(22, 43, 82, 0.055);
}

.control-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.control-panel > header > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-panel > header svg {
  width: 20px;
  height: 20px;
  color: var(--blue);
}

.control-panel > header span {
  display: grid;
  gap: 2px;
  color: var(--blue);
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.control-panel > header strong,
.control-panel > header small {
  display: block;
  font-family: var(--font);
}

.control-panel > header strong {
  color: var(--navy);
  font-size: 13px;
}

.control-panel > header small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.checkin-meter {
  height: 5px;
  background: #e8edf4;
}

.checkin-meter span {
  display: block;
  height: 100%;
  background: var(--success);
}

.control-panel-body {
  display: grid;
  min-height: 142px;
  align-content: space-between;
  gap: 18px;
  padding: 18px;
}

.control-panel-body p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.control-panel-body .button {
  justify-self: start;
}

.round-overview {
  grid-template-columns: 1fr 1fr;
}

.round-overview > div {
  display: grid;
  gap: 4px;
}

.round-overview > div span {
  color: var(--muted);
  font-size: 10px;
}

.round-overview > div strong {
  color: var(--navy);
  font-family: "DM Sans", sans-serif;
  font-size: 18px;
}

.round-overview .button {
  grid-column: 1 / -1;
}

.organizer-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.organizer-footer-actions span,
.table-caption {
  color: var(--muted);
  font-size: 10px;
}

.roster-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 12px;
  margin-bottom: 13px;
}

.roster-count {
  display: flex;
  min-width: 145px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.roster-count span {
  color: var(--muted);
  font-size: 10px;
}

.roster-count strong {
  color: var(--success);
  font-family: "DM Sans", sans-serif;
}

.roster-walk-in-button {
  min-width: 150px;
}

.walk-in-tag {
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-family: "DM Sans", sans-serif;
  font-size: 8px;
  font-weight: 800;
}

.roster-table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
  font-size: 11px;
}

.roster-table th {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9px;
  text-align: left;
}

.roster-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.roster-table tr:last-child td {
  border-bottom: 0;
}

.roster-table tr.is-mine td {
  background: var(--blue-soft);
}

.roster-table td strong,
.roster-table td small {
  display: block;
}

.roster-table td small {
  color: var(--blue);
  font-size: 8px;
  font-weight: 800;
}

.roster-table code {
  color: var(--navy);
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
}

.button.compact {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 10px;
}

.empty-state.slim {
  min-height: 150px;
}

.table-caption {
  margin: 9px 2px 0;
}

.match-control-list {
  display: grid;
  gap: 9px;
}

.match-control {
  display: grid;
  grid-template-columns: 76px minmax(240px, 1fr) minmax(300px, 1.1fr);
  min-height: 64px;
  align-items: center;
  gap: 14px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.match-control.complete {
  border-color: #cce5d9;
}

.third-place-control {
  border-color: #b9c9e8;
  background: var(--blue-soft);
}

.control-table {
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  font-weight: 800;
}

.control-table strong,
.control-table small {
  display: block;
}

.control-table strong {
  color: var(--navy);
  font-size: 10px;
}

.result-review-state {
  margin-top: 5px;
  font-family: "Noto Sans HK", sans-serif;
  font-size: 8px;
}

.result-review-state.complete {
  color: var(--success);
}

.result-review-state.report-pending {
  color: var(--blue-dark);
}

.result-review-state.disputed {
  color: var(--danger);
}

.control-matchup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.control-matchup span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-matchup span small {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.control-matchup span.right {
  text-align: right;
}

.control-matchup .selected-winner {
  color: var(--success);
}

.control-matchup b {
  color: var(--navy);
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  text-align: center;
}

.result-buttons {
  display: grid;
  grid-template-columns: 1fr 64px 1fr;
  gap: 5px;
}

.result-buttons.two {
  grid-template-columns: repeat(2, 1fr);
}

.result-buttons button {
  min-height: 32px;
  overflow: hidden;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-buttons button:hover,
.result-buttons button.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.automatic-result {
  justify-self: end;
  color: var(--success);
  font-size: 10px;
  font-weight: 700;
}

.round-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.round-action-bar > div {
  display: grid;
  gap: 3px;
}

.round-action-bar span {
  color: var(--muted);
  font-size: 9px;
}

.round-action-bar strong {
  color: var(--navy);
  font-size: 12px;
}

.swiss-history-toolbar {
  margin-top: 24px;
}

.swiss-history-list {
  max-height: 480px;
  overflow-y: auto;
  padding-right: 3px;
}

.champion-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px 18px;
  border-radius: 6px;
  background: var(--warning-soft);
  color: var(--warning);
}

.champion-banner span {
  display: grid;
  gap: 2px;
  font-size: 10px;
}

.champion-banner strong {
  color: var(--navy);
  font-size: 16px;
}

.third-place-banner {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.integration-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.integration-status > div,
.api-security-note {
  display: flex;
  align-items: center;
  gap: 10px;
}

.integration-status > div > span,
.api-security-note span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.integration-status svg {
  flex: 0 0 auto;
}

.integration-status strong,
.integration-status small,
.api-security-note strong,
.api-security-note small {
  display: block;
}

.integration-status strong {
  color: var(--navy);
  font-size: 12px;
}

.integration-status small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.integration-status.connected {
  border-color: #bfe2d2;
  background: var(--success-soft);
}

.integration-status.connected svg {
  color: var(--success);
}

.integration-status.disconnected {
  border-color: #f0d39f;
  background: var(--warning-soft);
}

.integration-status.disconnected svg {
  color: var(--warning);
}

.media-delivery-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
}

.media-upload-panel,
.media-recipient-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 5px 18px rgba(22, 43, 82, 0.055);
}

.media-upload-panel > header,
.media-recipient-panel > header {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.media-upload-panel > header {
  justify-content: flex-start;
}

.media-upload-panel > header > span,
.media-recipient-panel > header > div > span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--blue);
}

.media-upload-panel > header > div,
.media-recipient-panel > header > div,
.media-recipient-panel > header > div > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.media-upload-panel > header > div,
.media-recipient-panel > header > div > div {
  display: grid;
  gap: 2px;
}

.media-upload-panel header strong,
.media-upload-panel header small,
.media-recipient-panel header strong,
.media-recipient-panel header small {
  display: block;
}

.media-upload-panel header strong,
.media-recipient-panel header strong {
  color: var(--navy);
  font-size: 12px;
}

.media-upload-panel header small,
.media-recipient-panel header small {
  color: var(--muted);
  font-size: 9px;
}

.text-button {
  flex: 0 0 auto;
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}

.text-button:hover {
  color: var(--blue-dark);
  text-decoration: underline;
}

.media-dropzone {
  position: relative;
  display: grid;
  min-height: 170px;
  margin: 16px;
  place-content: center;
  justify-items: center;
  gap: 7px;
  padding: 20px;
  border: 1px dashed #9dacc2;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--blue);
  cursor: pointer;
  text-align: center;
}

.media-dropzone:hover,
.media-dropzone:focus-within {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.media-dropzone strong {
  color: var(--navy);
  font-size: 13px;
}

.media-dropzone span {
  max-width: 300px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.media-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.media-file-list {
  display: grid;
  max-height: 232px;
  gap: 7px;
  margin: 0 16px;
  overflow-y: auto;
}

.media-file-list > span {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.media-file-list article {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.media-file-preview {
  position: relative;
  display: block;
  width: 54px;
  height: 42px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--navy);
}

.media-file-preview img,
.media-file-preview video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-file-preview svg {
  position: absolute;
  right: 3px;
  bottom: 3px;
  padding: 2px;
  border-radius: 3px;
  background: rgba(20, 33, 61, 0.82);
  color: #fff;
}

.media-file-list article > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.media-file-list article strong {
  overflow: hidden;
  color: var(--navy);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-file-list article small {
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
  font-size: 8px;
}

.media-message-field {
  position: relative;
  display: grid;
  gap: 6px;
  margin: 16px;
}

.media-message-field > span {
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.media-message-field textarea {
  width: 100%;
  min-height: 94px;
  resize: vertical;
  padding: 10px 11px 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 11px;
  line-height: 1.6;
}

.media-message-field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21, 87, 216, 0.11);
}

.media-message-field > small {
  position: absolute;
  right: 9px;
  bottom: 6px;
  color: var(--muted);
  font-size: 8px;
}

.media-recipient-list {
  max-height: 430px;
  overflow-y: auto;
}

.media-recipient-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(170px, 0.9fr);
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.media-recipient-row:hover {
  background: var(--surface-2);
}

.media-recipient-select {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.media-recipient-select input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--blue);
}

.recipient-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.media-recipient-select > span:last-child {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.media-recipient-select strong,
.media-recipient-select small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-recipient-select strong {
  color: var(--navy);
  font-size: 11px;
}

.media-recipient-select small {
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
  font-size: 8px;
}

.recipient-phone {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  color: var(--success);
}

.recipient-phone input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: 0;
  background: var(--surface-2);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
}

.recipient-phone input:focus {
  border-color: var(--blue);
}

.media-privacy-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 13px 14px 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.media-privacy-note svg {
  flex: 0 0 auto;
  color: var(--success);
}

.media-delivery-error {
  min-height: 18px;
  margin: 8px 14px 0;
}

.media-send-button {
  width: calc(100% - 28px);
  margin: 0 14px 14px;
}

.media-send-button svg[data-lucide="loader-circle"] {
  animation: media-spin 900ms linear infinite;
}

@keyframes media-spin {
  to {
    transform: rotate(360deg);
  }
}

.media-history-section {
  margin-top: 26px;
}

.media-history-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.media-history-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
}

.media-history-row:last-child {
  border-bottom: 0;
}

.media-history-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
}

.media-history-row.submitted .media-history-icon {
  background: var(--blue-soft);
  color: var(--blue);
}

.media-history-row.partial .media-history-icon {
  background: var(--warning-soft);
  color: var(--warning);
}

.media-history-row.failed .media-history-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.media-history-row > div,
.media-history-result,
.media-history-empty span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.media-history-row > div strong {
  overflow: hidden;
  color: var(--navy);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-history-row small,
.media-history-result {
  color: var(--muted);
  font-size: 8px;
}

.media-history-result {
  justify-items: end;
  color: var(--navy);
  font-size: 10px;
  font-weight: 800;
}

.media-history-empty {
  display: flex;
  min-height: 106px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  border: 1px dashed #b8c4d6;
  border-radius: var(--radius);
  color: var(--muted);
}

.media-history-empty strong {
  color: var(--navy);
  font-size: 11px;
}

.media-history-empty small {
  font-size: 9px;
}

.media-recipient-panel .media-history-empty {
  margin: 14px;
}

.media-completion-gate {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  min-height: 150px;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border: 1px dashed #aebbcf;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.media-completion-gate > span {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
}

.media-completion-gate h2 {
  margin: 0 0 5px;
  color: var(--navy);
  font-size: 17px;
}

.media-completion-gate p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.api-security-note {
  margin-top: 14px;
  padding: 11px 12px;
  border-radius: 6px;
  background: var(--success-soft);
  color: var(--success);
}

.api-security-note strong {
  color: var(--navy);
  font-size: 10px;
}

.api-security-note small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.mobile-nav {
  display: none;
}

.toast-root {
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 8px;
}

.modal-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(11, 24, 48, 0.62);
  backdrop-filter: blur(5px);
}

.modal-panel {
  width: min(620px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 28px 70px rgba(8, 21, 46, 0.3);
  animation: modal-in 180ms ease both;
}

.modal-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
}

.modal-header span {
  display: block;
  margin-bottom: 3px;
  color: var(--blue);
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.modal-header h2 {
  margin: 0;
  color: var(--navy);
  font-size: 20px;
}

.modal-event-summary {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 15px;
  margin: 20px 22px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.modal-event-summary img {
  width: 116px;
  height: 78px;
  border-radius: 5px;
  object-fit: cover;
}

.modal-event-summary div {
  display: grid;
  align-content: center;
  gap: 4px;
}

.modal-event-summary span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
}

.modal-event-summary strong {
  color: var(--navy);
  font-size: 14px;
}

.modal-event-summary small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-notice {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 12px 22px 0;
  padding: 11px 13px;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--blue);
}

.entry-notice.lottery {
  background: var(--warning-soft);
  color: var(--warning);
}

.entry-notice svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.entry-notice span {
  display: grid;
  gap: 2px;
}

.entry-notice strong {
  color: var(--navy);
  font-size: 11px;
}

.entry-notice small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.registration-form {
  padding: 20px 22px 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.form-grid.three-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.form-field span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.form-field input,
.form-field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  background: var(--surface-2);
  color: var(--ink);
}

.form-field input:focus,
.form-field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21, 87, 216, 0.1);
}

.event-settings-form {
  padding-top: 22px;
}

.beyblade-event-settings,
.beyblade-registration {
  margin: 18px 0 0;
  padding: 14px;
  border: 1px solid #bed1ee;
  border-radius: 7px;
  background: #f4f8ff;
}

.beyblade-event-settings[hidden] {
  display: none;
}

.beyblade-event-settings legend,
.beyblade-registration legend {
  padding: 0 6px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
}

.beyblade-event-settings > a,
.beyblade-registration > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 11px;
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.beyblade-registration-list {
  display: grid;
  gap: 10px;
}

.beyblade-registration-list > section {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.beyblade-registration-list > section > strong {
  display: block;
  margin-bottom: 9px;
  color: var(--blue-dark);
  font-size: 10px;
}

.beyblade-config-summary {
  display: grid;
  min-width: 170px;
  gap: 3px;
}

.beyblade-config-summary span {
  color: var(--ink);
  font-size: 9px;
  white-space: nowrap;
}

.beyblade-config-summary b {
  margin-right: 3px;
  color: var(--blue);
}

.walk-in-link-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--blue-dark);
}

.walk-in-link-note span {
  display: grid;
  gap: 2px;
}

.walk-in-link-note strong {
  color: var(--navy);
  font-size: 11px;
}

.walk-in-link-note small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.loadout-empty {
  color: var(--muted);
  font-size: 10px;
}

.entry-method-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

.entry-method-choice legend {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.entry-method-choice label {
  cursor: pointer;
}

.entry-method-choice input {
  position: absolute;
  opacity: 0;
}

.entry-method-choice label > span {
  display: grid;
  min-height: 80px;
  grid-template-columns: 25px 1fr;
  align-content: center;
  gap: 3px 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.entry-method-choice input:checked + span {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: 0 0 0 2px rgba(21, 87, 216, 0.08);
}

.entry-method-choice svg {
  grid-row: 1 / 3;
  align-self: center;
  color: var(--blue);
}

.entry-method-choice b {
  color: var(--navy);
  font-size: 11px;
}

.entry-method-choice small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.settings-final-row {
  align-items: end;
  margin-top: 16px;
}

.switch-field {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  cursor: pointer;
}

.switch-field input {
  width: 17px;
  height: 17px;
  accent-color: var(--blue);
}

.switch-field span {
  display: grid;
  gap: 1px;
}

.switch-field b {
  color: var(--navy);
  font-size: 10px;
}

.switch-field small {
  color: var(--muted);
  font-size: 8px;
}

.consent-row {
  display: flex;
  align-items: start;
  gap: 9px;
  margin-top: 16px;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  line-height: 1.55;
}

.consent-row input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--blue);
}

.registration-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 17px;
  padding: 13px 15px;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 700;
}

.registration-total strong {
  font-family: "DM Sans", sans-serif;
  font-size: 18px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.destructive-confirmation {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 22px;
  padding: 16px;
  border: 1px solid #f4cbd1;
  border-radius: 7px;
  background: var(--danger-soft);
  color: var(--danger);
}

.destructive-confirmation > span {
  display: grid;
  flex: 0 0 40px;
  height: 40px;
  place-items: center;
  border-radius: 6px;
  background: #fff;
}

.destructive-confirmation strong,
.destructive-confirmation p,
.destructive-confirmation small {
  display: block;
}

.destructive-confirmation p {
  margin: 7px 0;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.65;
}

.destructive-confirmation small {
  color: var(--muted);
}

.detail-visual {
  position: relative;
  height: 210px;
  overflow: hidden;
}

.detail-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-visual .format-badge {
  top: 16px;
  left: 18px;
}

.detail-content {
  padding: 20px 22px 0;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.detail-facts > div {
  display: flex;
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--blue);
}

.detail-facts svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.detail-facts span {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 10px;
}

.detail-facts strong {
  color: var(--ink);
  font-size: 12px;
}

.rules-block {
  padding-top: 18px;
}

.rules-block h3 {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 14px;
}

.rules-block p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.detail-actions {
  margin-top: 18px;
}

.digital-pass,
.player-id-panel {
  display: grid;
  justify-items: center;
  padding: 28px 24px 8px;
  text-align: center;
}

.digital-pass h3 {
  margin: 5px 0 20px;
  color: var(--navy);
  font-size: 20px;
}

.pass-code {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 18px 28px;
  border: 1px dashed #aebbd0;
  border-radius: 7px;
  background: var(--surface-2);
}

.ticket-code-mark.large {
  width: 90px;
  height: 90px;
  border-width: 9px;
  background-size: 21px 21px;
}

.pass-code strong,
.player-id-panel b {
  color: var(--navy);
  font-family: "DM Sans", sans-serif;
  font-size: 17px;
}

.pass-code span,
.player-id-panel span,
.player-id-panel small {
  color: var(--muted);
  font-size: 11px;
}

.pass-meta {
  display: grid;
  gap: 5px;
  margin: 17px 0 13px;
  color: var(--muted);
  font-size: 12px;
}

.player-id-panel {
  gap: 6px;
}

.player-id-avatar {
  display: grid;
  width: 60px;
  height: 60px;
  margin-bottom: 4px;
  place-items: center;
  border-radius: 50%;
  background: var(--cyan);
  color: #fff;
  font-weight: 800;
}

.player-code {
  width: 120px;
  height: 120px;
  margin: 17px 0 8px;
  border-width: 11px;
  background-size: 25px 25px;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
}

.toast {
  display: flex;
  width: min(370px, calc(100vw - 32px));
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid #cde9dc;
  border-radius: 7px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--success);
  font-size: 13px;
  font-weight: 700;
  animation: toast-in 220ms ease both;
}

.toast svg {
  width: 19px;
  height: 19px;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (max-width: 980px) {
  .topbar {
    padding: 0 20px;
  }

  .brand,
  .account-area {
    min-width: auto;
  }

  .brand-copy small,
  .account-name {
    display: none;
  }

  .event-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }

  .management-event-row {
    grid-template-columns: 62px minmax(240px, 1fr) 130px auto;
  }

  .management-numbers {
    display: none;
  }

  .filter-panel .field-wrap {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .topbar {
    height: 60px;
    grid-template-columns: 1fr auto;
    padding: 0 16px;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal-panel {
    width: 100%;
    max-height: 92vh;
    border-radius: 8px 8px 0 0;
  }

  .form-grid,
  .detail-facts {
    grid-template-columns: 1fr;
  }

  .form-grid.three-columns {
    grid-template-columns: 1fr;
  }

  .form-field-wide {
    grid-column: auto;
  }

  .entry-method-choice {
    grid-template-columns: 1fr;
  }

  .modal-event-summary {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .modal-event-summary img {
    width: 88px;
    height: 72px;
  }

  .detail-visual {
    height: 168px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .desktop-nav {
    display: none;
  }

  .game-category-bar {
    top: 60px;
  }

  .game-category {
    flex-basis: 104px;
    min-width: 104px;
    height: 70px;
  }

  .game-category:first-child {
    flex-basis: 84px;
    min-width: 84px;
  }

  .game-logo-frame {
    width: 82px;
    height: 30px;
  }

  .main-content {
    width: min(100% - 28px, 600px);
    padding-top: 24px;
  }

  .page-heading {
    align-items: start;
    flex-direction: column;
    gap: 14px;
  }

  .page-heading h1 {
    font-size: 29px;
  }

  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-item:nth-child(3) {
    border-left: 0;
  }

  .stat-item:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .filter-panel .field-wrap {
    grid-column: auto;
  }

  .event-grid {
    grid-template-columns: 1fr;
  }

  .tournament-ticket {
    grid-template-columns: 1fr;
  }

  .ticket-main {
    padding: 20px 20px 21px 24px;
  }

  .ticket-heading {
    align-items: start;
    flex-direction: column;
  }

  .ticket-details {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .ticket-stub {
    grid-template-columns: 64px minmax(0, 1fr);
    justify-items: start;
    gap: 3px 14px;
    border-top: 1px dashed #b9c5d7;
    border-left: 0;
    text-align: left;
  }

  .ticket-stub::before,
  .ticket-stub::after {
    top: -9px;
    bottom: auto;
  }

  .ticket-stub::before {
    left: -9px;
  }

  .ticket-stub::after {
    right: -9px;
    left: auto;
  }

  .ticket-code-mark {
    grid-row: 1 / 5;
  }

  .ticket-stub .button {
    grid-column: 2;
  }

  .live-event-picker {
    width: 100%;
  }

  .current-pairing {
    grid-template-columns: 70px 92px minmax(0, 1fr);
    min-height: 116px;
  }

  .own-standing {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .own-standing > div:nth-child(2) {
    border-right: 0;
  }

  .own-standing > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .pairing-live-label {
    font-size: 9px;
  }

  .table-number strong {
    font-size: 38px;
  }

  .current-opponent {
    padding: 15px;
  }

  .current-opponent strong {
    font-size: 17px;
  }

  .round-clock {
    grid-column: 1 / -1;
    justify-content: center;
    margin: 0;
    border-radius: 0;
  }

  .player-result-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .player-result-choices,
  .player-result-confirmation {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .player-result-confirmation {
    grid-template-columns: repeat(2, 1fr);
  }

  .pairing-row {
    grid-template-columns: 46px minmax(86px, 1fr) 34px minmax(86px, 1fr);
    gap: 7px;
    padding: 9px;
  }

  .match-state {
    display: none;
  }

  .section-toolbar {
    align-items: start;
  }

  .section-toolbar small {
    max-width: 130px;
    text-align: right;
  }

  .mobile-nav {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 7px 8px max(7px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -8px 24px rgba(22, 43, 82, 0.08);
  }

  .mobile-nav.organizer-nav {
    grid-template-columns: repeat(6, 1fr);
  }

  .organizer-control-grid {
    grid-template-columns: 1fr;
  }

  .management-event-row {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 11px;
    padding: 11px;
  }

  .management-date {
    width: 48px;
    height: 52px;
  }

  .management-event-meta {
    display: none;
  }

  .management-actions {
    align-items: end;
    flex-direction: column;
  }

  .management-actions .button {
    width: 38px;
    min-height: 34px;
    overflow: hidden;
    padding: 6px;
    color: transparent;
    font-size: 0;
  }

  .management-actions .button svg {
    color: var(--navy);
  }

  .application-summary-band {
    align-items: stretch;
    flex-direction: column;
  }

  .application-summary-band .button {
    width: 100%;
  }

  .lottery-review-band {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .lottery-publish-clock {
    min-width: 0 !important;
    justify-items: start;
    text-align: left;
  }

  .lottery-review-band.published > time {
    padding-left: 32px;
  }

  .application-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .application-stats > div:nth-child(2) {
    border-right: 0;
  }

  .application-stats > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .roster-toolbar {
    grid-template-columns: 1fr;
  }

  .roster-toolbar .button {
    width: 100%;
  }

  .match-control {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .control-matchup {
    order: 2;
  }

  .result-buttons {
    order: 3;
  }

  .round-action-bar,
  .organizer-footer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .integration-status {
    align-items: stretch;
    flex-direction: column;
  }

  .integration-status small {
    white-space: normal;
  }

  .integration-status .button {
    width: 100%;
  }

  .media-delivery-grid {
    grid-template-columns: 1fr;
  }

  .media-recipient-row {
    grid-template-columns: 1fr;
  }

  .recipient-phone {
    padding-left: 25px;
  }

  .media-completion-gate {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .media-completion-gate .button {
    width: 100%;
  }

  .media-history-row {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    padding: 9px;
  }

  .mobile-nav.organizer-nav .nav-item {
    font-size: 8px;
  }

  .mobile-nav .nav-item {
    min-height: 48px;
    flex-direction: column;
    gap: 3px;
    justify-content: center;
    padding: 2px;
    font-size: 10px;
  }

  .mobile-nav .nav-item.active::after {
    top: -8px;
    right: 22%;
    bottom: auto;
    left: 22%;
    border-radius: 0 0 3px 3px;
  }

  .mobile-nav .nav-item svg {
    width: 19px;
    height: 19px;
  }

  .toast-root {
    right: 16px;
    bottom: 82px;
    left: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 820px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    display: none;
  }

  .auth-form-panel {
    min-height: 100vh;
    padding: 22px;
  }

  .auth-mobile-brand {
    display: flex;
  }
}