/* Mobile-first; narrow viewport default. */
:root {
  --bg: #0f1419;
  --surface: #1a222c;
  --text: #e8ecf0;
  --muted: #8b99a6;
  --accent: #3d9cf5;
  --error: #f07178;
  --max-width: 24rem;
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

/* Ensure utility `hidden` wins over component display (e.g. .view--loading { display: flex }). */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100dvh;
  padding-left: max(0px, env(safe-area-inset-left, 0px));
  padding-right: max(0px, env(safe-area-inset-right, 0px));
}

.app {
  min-height: 100dvh;
  padding: max(1.5rem, env(safe-area-inset-top, 0px)) 1.25rem
    max(2rem, env(safe-area-inset-bottom, 0px));
  max-width: var(--max-width);
  margin: 0 auto;
}

.view__title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

.view__message {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.view--loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40dvh;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form__input {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid #2c3641;
  border-radius: 0.5rem;
  padding: 0.7rem 0.8rem;
  min-height: 2.75rem;
}

.form__input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.form__error {
  color: var(--error);
  font-size: 0.88rem;
  margin: 0;
}

.form__submit {
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  min-height: 2.75rem;
  margin-top: 0.25rem;
  cursor: pointer;
}

.form__submit:active {
  filter: brightness(0.92);
}

.form__submit--danger {
  background: #8b2e2e;
  color: #fff;
}

.form__submit--secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid #2c3641;
  margin-top: 1rem;
}

.app--wide,
.view--app {
  --max-width: 26rem;
}

/* Signed-in shell */
.view--app {
  padding-top: 0.5rem;
}

.shell-header {
  margin-bottom: 0.75rem;
}

.shell-header__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media (max-width: 25rem) {
  .shell-header__row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .btn-menu {
    align-self: flex-start;
  }
}

.btn-menu {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 2.5rem;
  padding: 0.35rem 0.6rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid #2c3641;
  border-radius: 0.45rem;
  cursor: pointer;
}

.shell-breadcrumb {
  font-size: 0.9rem;
  color: var(--muted);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell-breadcrumb .bc-link {
  color: var(--accent);
  text-decoration: none;
}

.shell-breadcrumb .bc-here {
  color: var(--text);
  font-weight: 500;
}

.bc-sep {
  margin: 0 0.2rem;
  opacity: 0.6;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(16rem, 86vw);
  z-index: 11;
  background: var(--surface);
  border-right: 1px solid #2c3641;
  padding: max(1rem, env(safe-area-inset-top, 0)) 1.1rem
    max(1.5rem, env(safe-area-inset-bottom, 0)) 1.1rem;
  padding-left: max(1.1rem, env(safe-area-inset-left, 0));
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.35);
}

.nav-drawer__title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.6rem;
}

.nav-drawer__link {
  display: block;
  color: var(--text);
  text-decoration: none;
  padding: 0.5rem 0;
  font-weight: 500;
  border-bottom: 1px solid #2a343e;
}

.nav-drawer__link:active {
  color: var(--accent);
}

.nav-drawer__close {
  margin-top: 1.25rem;
  font: inherit;
  color: var(--muted);
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.nav-drawer__signout {
  font: inherit;
  font-size: 1em;
  width: 100%;
  text-align: left;
  margin-top: 0.5rem;
  color: var(--error);
  background: none;
  border: none;
  border-top: 1px solid #2a343e;
  padding: 0.75rem 0 0.25rem;
  cursor: pointer;
}

.nav-drawer__signout:active {
  opacity: 0.85;
}

.app-screen__kicker {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.25rem;
}

.app-screen__email {
  display: inline-block;
  max-width: min(100%, 12rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

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

.stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  margin: 0 0 1rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid #2c3641;
  border-radius: 0.5rem;
  padding: 0.7rem 0.8rem;
}

.stat-card__label {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 0.2rem;
}

.stat-card__value {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
}

.stat-card__demo,
.stat-card__label + .stat-card__demo {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0.35rem 0 0;
}

.tournament-list {
  list-style: none;
  margin: 0.6rem 0 0.75rem;
  padding: 0;
}

.tournament-list__item {
  border-bottom: 1px solid #2c3641;
  padding: 0.5rem 0;
}

.tournament-list__link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.tournament-list__meta {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin: 0.5rem 0 0.75rem;
  flex-wrap: wrap;
}

.pager__info {
  font-size: 0.85rem;
  color: var(--muted);
}

.form__submit--link {
  display: block;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  width: 100%;
}

.form__success {
  color: #9ece6a;
  font-size: 0.9rem;
  margin: 0;
}

.tpart-pair {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #2c3641;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.tournament-create-bar {
  position: sticky;
  top: max(0.35rem, env(safe-area-inset-top, 0px));
  z-index: 2;
  margin: 0 0 0.5rem;
  padding: 0.4rem 0 0.5rem;
  background: var(--bg);
  box-shadow: 0 6px 12px -4px var(--bg);
}

.tournament-create-bar .form__submit--link {
  margin-top: 0;
}

.form__nav {
  display: block;
  margin-top: 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  text-align: center;
  padding: 0.5rem 0.25rem;
  min-height: 2.75rem;
  line-height: 1.3;
  box-sizing: border-box;
  border-radius: 0.45rem;
}

.form__nav:active {
  color: #fff;
  background: rgba(61, 156, 245, 0.15);
}

.form-actions .form__nav {
  margin-top: 0;
}

.tedit-actions__commit {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.form-tev-edit__nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.form-tev-edit__nav .form__nav {
  margin-top: 0;
}

.tev-embed-participants {
  margin: 1.25rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid #2c3641;
}

.tev-embed-participants__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.tev-embed-participants__hint {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
  line-height: 1.35;
}

#tev-embed-participants-add {
  width: 100%;
  margin-bottom: 0.65rem;
}

.tev-embed-participants__list {
  margin-top: 0.35rem;
}

.tev-embed-fixtures {
  margin: 1.25rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid #2c3641;
}

#tev-fixtures-generate {
  width: 100%;
  margin-bottom: 0.5rem;
}

.tev-fixtures-swap {
  margin: 0.5rem 0 0.75rem;
  font-size: 0.9rem;
}

.tev-swap-grid {
  display: grid;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

@media (min-width: 28rem) {
  .tev-swap-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.tev-fixtures-mount {
  margin-top: 0.75rem;
  overflow-x: auto;
}

.tev-fixtures-shell {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tev-fix-compact-intro {
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: var(--muted);
}

.tev-fix-round-details {
  border: 1px solid #3a4654;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.1);
}

.tev-fix-round-details > summary {
  list-style-position: outside;
  padding: 0.55rem 0.65rem;
  cursor: pointer;
  min-height: 2.75rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.tev-fix-round-details__panel {
  padding: 0 0.6rem 0.55rem;
  border-top: 1px solid rgba(58, 70, 84, 0.6);
}

.tev-fix-full-bracket {
  margin-top: 0.75rem;
  border: 1px dashed #4a5a6a;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.08);
}

.tev-fix-full-bracket > summary {
  padding: 0.6rem 0.7rem;
  cursor: pointer;
  min-height: 2.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.tev-fix-full-bracket__panel {
  padding: 0.25rem 0.55rem 0.65rem;
}

.tev-fix-full-round {
  margin-bottom: 0.75rem;
}

.tev-fix-full-round__title {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0.45rem 0 0.3rem;
}
.tev-fix-round {
  margin-bottom: 1rem;
}

.tev-fix-round__title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.tev-fix-match {
  border: 1px solid #3a4654;
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.12);
}

.tev-fix-match__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.tev-fix-match__vs {
  color: var(--muted);
  font-size: 0.82rem;
}

.tev-part-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

@media (min-width: 28rem) {
  .tev-part-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.tev-part-row__label {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.tev-part-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  flex-shrink: 0;
}

.tev-part-row__actions .form__submit {
  margin: 0;
  padding: 0.45rem 0.75rem;
  font-size: 0.88rem;
  min-height: 2.5rem;
}

.modal-dialog {
  width: calc(100vw - 2rem);
  max-width: 26rem;
  max-height: min(90vh, 36rem);
  padding: 0;
  border: 1px solid #2c3641;
  border-radius: 0.5rem;
  background: var(--bg);
  color: inherit;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.modal-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.modal-dialog__form {
  padding: 1rem 1rem 1.1rem;
  max-height: min(88vh, 35rem);
  overflow-y: auto;
  box-sizing: border-box;
}

.modal-dialog__title {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
}

.modal-dialog__actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  margin-top: 1rem;
}

@media (min-width: 28rem) {
  .modal-dialog__actions {
    flex-direction: row;
    justify-content: flex-end;
  }

  .modal-dialog__actions .form__submit {
    width: auto;
    min-width: 6rem;
  }
}

.tedit-surface {
  min-height: 15rem;
}

@media (min-width: 40rem) {
  :root {
    --max-width: 28rem;
  }
}

/* Mobile-first UI modernization pass. Keep behavior unchanged; polish presentation. */
:root {
  --bg: #0b1014;
  --surface: #151c24;
  --surface-2: #101820;
  --surface-3: #1d2834;
  --border: #263443;
  --border-strong: #36485a;
  --text: #f2f6f8;
  --muted: #9caab7;
  --accent: #46a7ff;
  --accent-strong: #2f94ef;
  --accent-soft: rgba(70, 167, 255, 0.13);
  --success: #84d18a;
  --danger: #ff7d83;
  --danger-soft: rgba(255, 125, 131, 0.1);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
}

body {
  background:
    radial-gradient(circle at top left, rgba(70, 167, 255, 0.08), transparent 24rem),
    linear-gradient(180deg, #0d141a 0%, var(--bg) 34%);
}

body.has-sticky-save .app {
  padding-bottom: max(6.25rem, calc(env(safe-area-inset-bottom, 0px) + 6rem));
}

.app {
  width: 100%;
}

.view {
  animation: view-in 180ms ease-out;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(0.35rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-brand {
  margin: 0 0 1.5rem;
}

.login-brand__name {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.login-brand__tagline {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.35;
}

.view__title {
  letter-spacing: 0;
}

.form {
  gap: 1rem;
}

.form__label {
  letter-spacing: 0.06em;
}

.form__input {
  background: linear-gradient(180deg, #17212b 0%, #131b24 100%);
  border-color: var(--border);
  border-radius: 0.65rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.form__input:focus {
  outline: 3px solid rgba(70, 167, 255, 0.22);
  outline-offset: 1px;
}

.form__submit {
  border-radius: 0.7rem;
  background: linear-gradient(180deg, #4aaaff 0%, var(--accent-strong) 100%);
  box-shadow: 0 12px 28px rgba(47, 148, 239, 0.22);
}

.form__submit:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.form__submit--secondary {
  background: var(--surface-3);
  border-color: var(--border-strong);
  box-shadow: none;
}

.form__submit--danger {
  background: #7d3035;
  box-shadow: none;
}

.form__success {
  color: var(--success);
}

.shell-header {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: -0.25rem -0.25rem 1rem;
  padding: 0.25rem;
  background: linear-gradient(180deg, rgba(11, 16, 20, 0.96) 0%, rgba(11, 16, 20, 0.86) 100%);
  backdrop-filter: blur(12px);
}

.shell-header__row {
  flex-wrap: nowrap;
}

.btn-menu {
  border-radius: 999px;
  border-color: var(--border);
  background: var(--surface);
  padding: 0.35rem 0.75rem;
}

.shell-breadcrumb {
  padding: 0.2rem 0;
}

.nav-drawer {
  background: #111922;
  border-color: var(--border);
}

.nav-drawer__link {
  border-bottom-color: var(--border);
  border-radius: 0.45rem;
  padding: 0.65rem 0.55rem;
}

.nav-drawer__link:active,
.nav-drawer__link:hover {
  background: var(--accent-soft);
}

.stat-card,
.tournament-list__item,
.edit-section,
.tev-fix-round-details,
.tev-fix-full-bracket,
.tev-fix-match {
  background: linear-gradient(180deg, rgba(23, 31, 40, 0.96), rgba(14, 21, 28, 0.96));
  border: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025);
}

.stat-card {
  border-radius: 0.75rem;
}

.tournament-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.tournament-list__item {
  border-radius: 0.75rem;
  padding: 0;
  overflow: hidden;
}

.tournament-list__item br {
  display: none;
}

.tournament-list__link {
  display: block;
  padding: 0.8rem 0.85rem 0.25rem;
  color: var(--text);
  font-weight: 700;
}

.tournament-list__link:active {
  color: var(--accent);
}

.tournament-list__meta {
  padding: 0 0.85rem 0.8rem;
}

.pager {
  padding-top: 0.25rem;
}

.tournament-create-bar {
  top: 3.25rem;
  padding: 0.35rem 0 0.65rem;
  background: linear-gradient(180deg, rgba(11, 16, 20, 0.94), rgba(11, 16, 20, 0.76));
  backdrop-filter: blur(10px);
  box-shadow: none;
}

.form__nav,
.screen-heading__back {
  color: var(--accent);
  text-decoration: none;
}

.form__nav {
  min-height: 2.5rem;
}

.screen-heading {
  margin: 0 0 0.95rem;
}

.screen-heading .view__title {
  margin-bottom: 0;
}

.screen-heading__back {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
  font-weight: 650;
}

.screen-heading__back::before {
  content: "<";
  margin-right: 0.35rem;
}

.edit-section {
  border-radius: 0.9rem;
  padding: 1rem;
}

.edit-section + .edit-section,
.edit-section + .danger-zone {
  margin-top: 0.9rem;
}

.edit-section__title,
.tev-embed-participants__title {
  font-size: 0.98rem;
  font-weight: 750;
  margin: 0 0 0.6rem;
}

.edit-section--details {
  padding-top: 0.95rem;
}

.tev-embed-participants,
.tev-embed-fixtures {
  border-top: 0;
  padding-top: 1rem;
}

#tev-embed-participants-add,
#tev-fixtures-generate,
#tev-swap-apply {
  margin-top: 0;
}

.tev-part-row {
  padding: 0.75rem;
}

.tev-part-row__actions {
  padding-top: 0.1rem;
}

.tev-fix-round-details,
.tev-fix-full-bracket {
  border-radius: 0.85rem;
}

.tev-fix-full-bracket {
  border-style: dashed;
}

.tev-fix-match {
  border-radius: 0.7rem;
  padding: 0.7rem 0.75rem;
}

.danger-zone {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.95rem;
  border: 1px solid rgba(255, 125, 131, 0.24);
  border-radius: 0.9rem;
  background: var(--danger-soft);
}

.danger-zone__title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 750;
  color: #ffd2d5;
}

.danger-zone__copy {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.danger-zone__button {
  align-self: flex-start;
  min-height: 2.5rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(255, 125, 131, 0.35);
  border-radius: 0.65rem;
  color: #ffd2d5;
  background: rgba(125, 48, 53, 0.22);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.danger-zone__button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.sticky-save {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  padding: 0.75rem 1.25rem max(0.85rem, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(70, 167, 255, 0.18);
  background: rgba(11, 16, 20, 0.9);
  backdrop-filter: blur(14px);
  box-shadow: 0 -14px 36px rgba(0, 0, 0, 0.32);
}

.sticky-save__button {
  display: block;
  width: min(100%, var(--max-width));
  margin: 0 auto;
}

.modal-dialog {
  border-color: var(--border);
  border-radius: 0.9rem;
  background: var(--surface-2);
}

.modal-dialog__form {
  padding: 1.1rem;
}

.modal-dialog__title {
  font-weight: 750;
}

.modal-dialog--confirm .modal-dialog__actions {
  margin-top: 0.35rem;
}

.tev-fix-match__open {
  display: block;
  color: inherit;
  text-decoration: none;
}

.tev-fix-match__open:focus-visible {
  outline: 2px solid rgba(70, 167, 255, 0.65);
  outline-offset: 3px;
  border-radius: 0.35rem;
}

.tematch-root {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tematch-badge {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(220, 236, 248, 0.82);
}

.tematch-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0.75rem;
}

.tematch-score__side {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.tematch-score__label {
  font-size: 0.82rem;
  text-align: center;
  color: rgba(220, 236, 248, 0.82);
  word-break: break-word;
}

.tematch-score__num {
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.tematch-score__dash {
  font-size: 2rem;
  font-weight: 700;
  opacity: 0.45;
}

.tematch-meta {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(220, 236, 248, 0.78);
}

.tematch-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.tematch-controls .tematch-point {
  flex: 1 1 calc(50% - 0.45rem);
  min-height: 3rem;
  font-size: 1rem;
  font-weight: 650;
}

.tematch-details {
  border: 1px solid rgba(70, 167, 255, 0.15);
  border-radius: 0.65rem;
  padding: 0.35rem 0.65rem;
}

.tematch-details summary {
  cursor: pointer;
  font-weight: 600;
}

.tematch-walkover {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-top: 0.5rem;
}

.tematch-details--danger {
  border-color: rgba(255, 125, 131, 0.22);
}

.tematch-danger-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding-top: 0.5rem;
}

.tematch-history__title {
  font-size: 1rem;
  margin: 0 0 0.35rem;
}

.tematch-history__sheet {
  max-height: min(50vh, 22rem);
  overflow: auto;
  border: 1px solid rgba(70, 167, 255, 0.22);
  border-radius: 0.45rem;
  background: rgba(6, 12, 18, 0.35);
}

.tematch-history__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid rgba(70, 167, 255, 0.12);
}

.tematch-history__row:last-child {
  border-bottom: none;
}

.tematch-history__row--head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(11, 18, 26, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(70, 167, 255, 0.28);
}

.tematch-history__cell {
  min-height: 2rem;
  padding: 0.4rem 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
}

.tematch-history__cell--head {
  font-weight: 650;
  font-size: 0.78rem;
  text-align: center;
  color: rgba(220, 236, 248, 0.88);
  word-break: break-word;
  justify-content: center;
  text-wrap: balance;
}

.tematch-history__score {
  font-size: 1.05rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: rgba(230, 245, 255, 0.96);
}

@media (min-width: 40rem) {
  .view--app {
    --max-width: 38rem;
  }

  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 56rem) {
  .view--app {
    --max-width: 48rem;
  }

  .form--tev-edit {
    gap: 1rem;
  }

  .sticky-save__button {
    width: min(100%, 48rem);
  }
}
