/* Post-milestone ISO-2: responsive alignment and layout safeguards. */

/* Authenticated visibility must preserve the element's intended layout mode. */
body.has-account section.account-only:not(.hidden),
body.has-account details.account-only:not(.hidden),
body.has-account form.account-only:not(.hidden) {
  display: block !important;
}

body.has-account .account-only.hidden {
  display: none !important;
}

.site-header,
.main-nav,
.nav-menu,
.nav-dropdown,
.page-intro > *,
.surface-head > *,
.team-controls,
.account-page-actions,
.staff-event-row > *,
.staff-management-card > * {
  min-width: 0;
}

.nav-dropdown {
  max-width: calc(100vw - 28px);
}

body.server-authenticated-ui #page-staff-members > .access-panel,
body.server-authenticated-ui #page-staff-members > .owner-users-panel {
  display: none !important;
}

.rating-replay-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}
.rating-replay-pagination span { color: var(--muted); font-size: .82rem; }

/* Keep read-only role previews visible without covering header dropdowns. */
.role-simulation-banner {
  z-index: 20;
}

.events-team-registration {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, 1fr) auto;
  align-items: center;
  gap: 22px;
  margin: 22px 0 0;
  padding: 20px;
}
.events-team-registration h2 { margin: 4px 0 5px; }
.events-team-registration p { margin: 0; color: var(--muted); }
.events-team-registration-status { display: grid; gap: 3px; }
.events-team-registration-status span { color: var(--muted); font-size: 13px; }
@media (max-width: 1100px) {
  .events-team-registration { grid-template-columns: 1fr auto; }
  .events-team-registration-status { grid-column: 1 / -1; }
}

.team-controls {
  max-width: 100%;
  flex-wrap: wrap;
}

.team-controls select {
  min-width: 0;
  max-width: 100%;
}

.account-page-actions {
  flex-wrap: wrap;
}

.identity-claim-panel,
.store-claim-panel {
  overflow: hidden;
}

.identity-claim-panel .account-form,
.store-claim-panel .account-form,
.identity-claim-panel label,
.store-claim-panel label,
.identity-claim-panel input,
.store-claim-panel input,
.identity-claim-panel select,
.store-claim-panel select,
.store-claim-panel textarea {
  min-width: 0;
  max-width: 100%;
}

#identity-evidence-field,
#identity-evidence-field small,
#identity-evidence-field input {
  overflow-wrap: anywhere;
}

.staff-event-row strong,
.staff-event-row small {
  overflow-wrap: anywhere;
}

/* The poll action and date are ordinary document flow, so they cannot collide. */
.vote-side {
  display: flex;
  min-height: 320px;
  flex-direction: column;
}

.vote-side-content {
  min-width: 0;
}

.vote-side-content > p:not(.eyebrow) {
  color: #9fb0c2;
  font-size: 13px;
}

.vote-side-footer {
  display: grid;
  gap: 18px;
  margin-top: auto;
  padding-top: 24px;
}

.vote-side-footer .button {
  width: 100%;
}

.vote-side-footer .deadline {
  position: static;
  inset: auto;
  padding-top: 18px;
}

/* Desktop keeps the information-dense month grid; phones receive a complete agenda. */
.calendar-mobile-agenda {
  display: none;
}

.calendar-agenda-day {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(13, 16, 21, .96);
}

.calendar-agenda-day.selected {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold);
}

.calendar-agenda-day h2 {
  margin: 0;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font: 600 16px/1.2 "Space Grotesk", sans-serif;
}

.calendar-agenda-day > div {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.calendar-agenda-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 9px 10px;
  color: var(--ink);
  background: #171c23;
  text-align: left;
  cursor: pointer;
}

.calendar-agenda-event span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.calendar-agenda-event small {
  color: var(--muted);
  white-space: nowrap;
}

.calendar-agenda-event.blue { border-left-color: var(--blue); }
.calendar-agenda-event.gold { border-left-color: var(--gold); }
.calendar-agenda-event.grey { border-left-color: #9da4ad; }
.calendar-agenda-event.community-submitted { border-left-color: #d8b42f; }
.calendar-agenda-event.verified-lgs { border-left-color: #2f9a80; }
.calendar-agenda-event.cancelled { opacity: .72; text-decoration: line-through; }

/* Related staff tools remain distinct and individually navigable. */
.staff-management-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.staff-management-grid .community-broadcast-panel {
  margin-top: 0;
}

.staff-management-card,
.community-broadcast-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 96px;
}

.staff-management-card {
  color: var(--ink);
  text-decoration: none;
}

.staff-management-card > span:first-child,
.community-broadcast-panel > summary > span:first-child {
  display: grid;
  gap: 4px;
}

.staff-management-card small,
.community-broadcast-panel summary small {
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.staff-management-card > span:last-child,
.community-broadcast-panel > summary > span:last-child {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.staff-management-card:hover,
.staff-management-card:focus-visible {
  border-color: var(--gold);
}

.community-broadcast-panel[open] {
  grid-column: span 2;
}

/* Tables keep summaries visible and announce intentional horizontal navigation. */
.table-scroll-cue {
  display: none;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  color: var(--muted);
  font-size: 12px;
}

.table-scroll-cue span {
  color: var(--gold);
  font-size: 18px;
  font-weight: 900;
}

.ranking-table-wrap,
.analytics-table-wrap {
  max-width: 100%;
  scrollbar-color: var(--gold) #151a21;
  scrollbar-width: thin;
}

.ranking-table-wrap:focus-visible,
.analytics-table-wrap:focus-visible {
  border-radius: 8px;
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@media (max-width: 1100px) {
  .main-nav {
    max-height: calc(100dvh - 88px);
    overflow-y: auto;
  }

  .nav-menu {
    display: flex !important;
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .nav-menu-trigger {
    width: 100%;
  }

  .nav-dropdown,
  .staff-dropdown {
    position: static;
    display: grid;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: -2px 0 5px;
    padding: 4px 4px 4px 17px;
    border: 0;
    border-left: 2px solid #4f4522;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .nav-dropdown a {
    min-height: 44px !important;
    color: #aeb7c1 !important;
    font-size: 12px !important;
    white-space: normal;
  }

  .nav-dropdown a.active { color: #f5d75f !important; }
  .nav-menu-trigger > span:last-child { display: none; }

  .staff-management-grid {
    grid-template-columns: 1fr 1fr;
  }

  .community-broadcast-panel[open] {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .team-controls {
    width: 100%;
  }

  .team-controls select {
    width: 100%;
    min-height: 44px;
  }
}

@media (max-width: 760px) {
  .events-team-registration { grid-template-columns: 1fr; align-items: stretch; }
  .events-team-registration .button { width: 100%; }
  .calendar-shell {
    display: none !important;
  }

  .calendar-mobile-agenda {
    display: grid;
    gap: 12px;
  }

  .calendar-legend {
    flex-wrap: wrap;
  }

  .table-scroll-cue {
    display: flex;
  }

  .ranking-table-wrap,
  .analytics-table-wrap {
    border: 1px solid var(--line);
    border-radius: 10px;
    overscroll-behavior-inline: contain;
  }

  .ranking-surface .ranking-table th:first-child,
  .ranking-surface .ranking-table td:first-child,
  .analytics-table th:first-child,
  .analytics-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #171c23;
    box-shadow: 1px 0 0 var(--line);
  }

  .ranking-surface .ranking-table thead th:first-child,
  .analytics-table thead th:first-child {
    z-index: 3;
    background: #222831;
  }

  .staff-management-grid {
    grid-template-columns: 1fr;
  }

  .community-broadcast-panel[open] {
    grid-column: auto;
  }
}

.guide-search-row { grid-template-columns: minmax(0, 1fr) !important; }
.guide-filter-details { border: 1px solid var(--line); border-radius: 12px; background: rgba(7,14,25,.45); }
.guide-filter-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 10px 14px; cursor: pointer; }
.guide-filter-details > summary span:first-child { display: grid; gap: 2px; min-width: 0; }
.guide-filter-details > summary small { overflow: hidden; color: var(--muted); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.guide-filter-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, .3fr); align-items: end; gap: 14px; padding: 0 14px 14px; }
.guide-filter-body .guide-type-filter { margin: 0; }
.guide-type-filter label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guide-format-filter { align-self: end; }
@media (max-width: 700px) {
  .guide-filter-body { grid-template-columns: minmax(0, 1fr); }
  .guide-filter-details > summary { min-height: 52px; }
}
.account-role-preview { display: grid; grid-template-columns: minmax(0,1fr) minmax(12rem,.45fr) auto; align-items: end; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.account-role-preview > div,
.account-role-preview label { display: grid; gap: 4px; }
.account-role-preview small,
.account-role-preview [role="status"] { color: var(--muted); }
.account-role-preview [role="status"] { grid-column: 1 / -1; margin: 0; }
@media (max-width: 700px) {
  .account-role-preview { grid-template-columns: minmax(0,1fr); }
  .account-role-preview button,
  .account-role-preview select { min-height: 44px; width: 100%; }
}

/* ISO-13.19: reserve the ordinary desktop member-workspace footprint without trapping content. */
@media (min-width: 701px) {
  .community-member-workspace { min-height: 40rem; }
  .member-split-workspace { min-height: 31rem; align-items: stretch; }
  .member-split-workspace > * { align-content: start; }
}
@media (max-width: 700px) {
  .community-member-workspace,
  .member-split-workspace { min-height: 0; }
}

@media (max-width: 620px) {
  .account-page-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .account-page-actions > * {
    width: 100%;
    min-height: 44px;
  }

  .identity-claim-panel .form-grid,
  .store-claim-panel .form-grid {
    grid-template-columns: 1fr;
  }

  .identity-claim-panel .surface-head,
  .store-claim-panel .surface-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .staff-event-row {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .staff-event-row > :last-child {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 44px;
  }

  .staff-management-card,
  .community-broadcast-panel > summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .staff-management-card > span:last-child,
  .community-broadcast-panel > summary > span:last-child {
    text-align: left;
  }
}

@media (max-width: 430px) {
  .site-header {
    padding-inline: 12px;
  }

  .brand-title small {
    max-width: 118px;
  }

  .calendar-agenda-event {
    grid-template-columns: 1fr;
  }

  .calendar-agenda-event small {
    white-space: normal;
  }

  .vote-side {
    min-height: 0;
    padding: 22px;
  }
}

/* ISO-4 responsive art direction: the approved source image is unchanged. */
body::before {
  background-size: cover;
  background-position: 68% center;
}

.permission-context-loading .staff-only,
.permission-context-loading .admin-only,
.permission-context-error .staff-only,
.permission-context-error .admin-only {
  display: none !important;
}

.legacy-reconciliation-heading,
.legacy-reconciliation-counts {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.legacy-reconciliation-heading p:not(.eyebrow) {
  max-width: 68ch;
  color: var(--muted);
}

.legacy-reconciliation-counts {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 16px;
}

.legacy-reconciliation-counts span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}

#legacy-ranking-reconciliation details { margin-top: 16px; }
#legacy-ranking-reconciliation li { display: grid; gap: 3px; margin-bottom: 8px; }
#legacy-ranking-reconciliation li span { color: var(--muted); }

@media (min-width: 1600px) {
  body::before { background-position: 62% center; }
}

@media (min-width: 761px) and (max-width: 1100px) {
  body::before { background-size: auto 100%; background-position: 70% center; }
}

@media (max-width: 760px) {
  body::before { background-size: auto 100%; background-position: 75% center; }
  .legacy-reconciliation-heading { flex-direction: column; }
  .legacy-reconciliation-heading .button { width: 100%; min-height: 48px; }
}

@media (max-width: 900px) and (orientation: landscape) {
  body::before { background-size: cover; background-position: 72% center; }
}

[hidden] { display: none !important; }
.auth-unresolved #main-nav [data-nav-group="discover"],
.auth-unresolved #main-nav [data-nav-group="lending"],
.auth-unresolved #main-nav [data-nav-group="products"],
.auth-unresolved #main-nav [data-nav-group="account"],
.auth-unresolved #main-nav [data-nav-group="staff"] { display: none !important; }
/* ISO-13 discovery details: stack actions and validated placements on phones. */
.discovery-card > div:first-child { min-width: 0; }
.discovery-card-actions { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
.discovery-card-detail { align-items: stretch; }
.discovery-standings { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.discovery-standings h4 { margin: 0 0 9px; }
.discovery-standings p { margin: 5px 0; }
@media (max-width: 760px) {
  .discovery-card-actions { display: grid; width: 100%; }
  .discovery-card-actions .quiet-button { min-height: 44px; }
  .discovery-filter-form > div:first-child,
  #discovery-filters { grid-template-columns: minmax(0, 1fr); }
}

/* ISO-13.26–13.27: one filtered rating graph and one canonical event timeline. */
.competitive-profile-section { overflow: hidden; }
.competitive-history-filter {
  display: grid;
  grid-template-columns: minmax(9rem, .6fr) minmax(9rem, .6fr) auto minmax(14rem, 1fr);
  align-items: end;
  gap: 12px;
  margin: 0 0 16px;
}
.competitive-history-filter label { display: grid; gap: 5px; font-weight: 800; }
.competitive-history-filter input { min-height: 44px; }
.competitive-coverage { color: var(--muted); align-self: center; }
.competitive-history-filter .form-errors { grid-column: 1 / -1; }
.rating-history-chart { position: relative; display: block; grid-template-columns: none; grid-template-rows: none; gap: 0; margin: 0 0 22px; padding: 12px 12px 10px; border: 1px solid #52677e; border-radius: 14px; background: linear-gradient(180deg,rgba(9,17,28,.96),rgba(6,11,19,.88)); }
.rating-history-chart.legacy-record { border-color: rgba(242,205,69,.6); }
.rating-line-svg { display: block; width: 100%; height: auto; min-height: 240px; aspect-ratio: 760 / 300; overflow: visible; }
.rating-grid-line line { stroke: #43556a; stroke-width: 1; stroke-dasharray: 5 7; vector-effect: non-scaling-stroke; }
.rating-grid-line text { fill: #b8c5d3; font-size: 12px; text-anchor: end; }
.rating-line-area { fill: url(#rating-area-gradient); }
.rating-line-shadow { stroke: #02070d; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; opacity: .9; vector-effect: non-scaling-stroke; }
.rating-line-path { stroke: #45c8ff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.rating-line-point { stroke: #07101a; stroke-width: 4; vector-effect: non-scaling-stroke; cursor: pointer; }
.rating-line-point.gain { fill: #5ce1a6; }
.rating-line-point.loss { fill: #ff786f; }
.rating-line-point.neutral { fill: #f2cd45; }
.rating-line-point:focus { stroke: #fff; stroke-width: 5; outline: none; }
.rating-history-chart figcaption { margin-top: 4px; color: #c1ceda; text-align: center; font-size: .8rem; }
.single-rating-point { min-height: 150px; display: grid; place-content: center; text-align: center; gap: 5px; }
.single-rating-point strong { font-size: 2rem; color: #f2cd45; }
.ranking-calculation { display: block; max-width: 56rem; }
.ranking-calculation summary { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .7rem; cursor: pointer; }
.ranking-calculation summary::-webkit-details-marker { display: none; }
.ranking-calculation[open] summary { margin-bottom: .65rem; }
.ranking-calculation > div { padding: .75rem; border-left: 3px solid #f2cd45; border-radius: 0 10px 10px 0; background: rgba(242,205,69,.07); }
.ranking-calculation p { margin: 0 0 .55rem; line-height: 1.5; }
.ranking-calculation p:last-of-type { margin-bottom: .35rem; }
.competitive-history-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.competitive-history-heading h3 { margin: 0; }
.competitive-history-heading span,
.competitive-event-row small { color: var(--muted); }
.competitive-event-list { display: grid; }
.competitive-profile-section .public-profile-priority { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.competitive-event-row {
  display: grid;
  grid-template-columns: 58px minmax(15rem, 2fr) minmax(9rem, 1fr) minmax(8rem, .7fr) minmax(9rem, .8fr);
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.competitive-event-row:last-child { border-bottom: 0; }
.competitive-event-main,
.competitive-deck,
.competitive-snapshot { display: grid; gap: 4px; min-width: 0; }
.competitive-event-main strong,
.competitive-event-main a,
.competitive-event-main span,
.competitive-deck strong,
.competitive-deck a {
  overflow-wrap: anywhere;
}
.competitive-placement-badge {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(15,23,34,.82);
  font-size: 1.2rem;
  font-weight: 900;
}
.competitive-placement-badge.place-1 { border-color: #d6b239; color: #ffe16c; background: rgba(105,80,7,.72); }
.competitive-placement-badge.place-2 { border-color: #aab6c4; color: #edf2f7; background: rgba(73,87,102,.72); }
.competitive-placement-badge.place-3 { border-color: #b77a44; color: #ffd2a4; background: rgba(91,52,25,.72); }
.competitive-event-main a { color: #f2cd45; font-weight: 800; }
.competitive-event-main a:focus-visible { outline: 2px solid #f2cd45; outline-offset: 3px; }
.competitive-event-main > strong,
.competitive-event-main > a { font-size: 1rem; }
.competitive-event-main > span { font-weight: 800; }
.competitive-deck > span { color: var(--text); font-weight: 700; }
.competitive-deck > span + span { color: var(--muted); font-size: .78rem; font-weight: 500; }
.competitive-deck a { color: var(--gold); font-weight: 800; }
.historical-deck-snapshot { margin-top: 4px; }
.historical-deck-snapshot summary {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  color: var(--gold);
  font-size: .76rem;
  font-weight: 800;
  cursor: pointer;
}
.historical-deck-snapshot > div {
  display: grid;
  gap: 7px;
  margin-top: 5px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(9,13,18,.72);
}
.historical-deck-snapshot > div > span {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 700;
}
.historical-deck-snapshot ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 4px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.historical-deck-snapshot li { display: flex; gap: 5px; min-width: 0; font-size: .72rem; }
.historical-deck-snapshot li b { color: var(--gold); }
.historical-deck-snapshot li span { overflow-wrap: anywhere; }
.public-matchups-section { padding: 0; overflow: hidden; }
.public-matchups-heading {
  align-items: center;
  min-height: 86px;
  margin: 0;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
}
.public-matchups-heading::-webkit-details-marker,
.public-matchup-tournament > summary::-webkit-details-marker { display: none; }
.public-matchups-heading .section-collapse-toggle { pointer-events: none; }
.public-matchups-heading .expand-label { display: none; }
.public-matchups-section:not([open]) .public-matchups-heading .collapse-label { display: none; }
.public-matchups-section:not([open]) .public-matchups-heading .expand-label { display: inline; }
.public-matchups-section:not([open]) .public-matchups-heading .section-collapse-toggle b { transform: rotate(90deg); }
.public-matchups-section:not([open]) .public-matchups-heading { min-height: 74px; }
.public-matchups-body { padding: 0 24px 24px; }
.public-matchup-tournaments { display: grid; border-top: 1px solid var(--line); }
.public-matchup-tournament { border-bottom: 1px solid var(--line); }
.public-matchup-tournament > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 34px;
  align-items: center;
  gap: 18px;
  min-height: 76px;
  padding: 14px 8px;
  cursor: pointer;
  list-style: none;
}
.public-matchup-tournament > summary:hover,
.public-matchup-tournament > summary:focus-visible { background: rgba(242,205,69,.055); outline: none; }
.public-matchup-tournament > summary div { display: grid; gap: 4px; min-width: 0; }
.public-matchup-tournament > summary small { color: var(--muted); }
.public-matchup-tournament > summary strong { overflow-wrap: anywhere; font-size: 1rem; }
.public-matchup-tournament > summary > span { color: var(--muted); font-size: .8rem; font-weight: 800; white-space: nowrap; }
.public-matchup-tournament > summary > b {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #17191d;
  background: var(--gold);
  font-size: 1.1rem;
  transition: transform .18s ease;
}
.public-matchup-tournament[open] > summary > b { font-size: 0; }
.public-matchup-tournament[open] > summary > b::after { content: '−'; font-size: 1.1rem; }
.public-matchup-tournament-body { border-top: 1px solid rgba(82,103,126,.55); }
.public-matchup-tournament-deck {
  display: grid;
  grid-template-columns: minmax(12rem,.42fr) minmax(0,1fr);
  align-items: start;
  gap: 16px;
  padding: 16px 8px;
  background: linear-gradient(90deg,rgba(242,205,69,.045),transparent 55%);
}
.public-matchup-tournament-deck.is-empty { grid-template-columns: 1fr; gap: 3px; }
.public-matchup-tournament-deck-head { display: grid; gap: 4px; min-width: 0; }
.public-matchup-tournament-deck-head > span,
.public-matchup-tournament-deck.is-empty > span { color: var(--gold); font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.public-matchup-tournament-deck-head > strong { overflow-wrap: anywhere; font-size: 1rem; }
.public-matchup-tournament-deck-head > small,
.public-matchup-tournament-deck.is-empty > small,
.public-matchup-tournament-deck.is-empty > strong,
.public-matchup-deck-unavailable { color: var(--muted); }
.public-matchup-deck-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(54px,72px));
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.public-matchup-deck-card {
  position: relative;
  display: grid;
  aspect-ratio: 600/838;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #080d14;
}
.public-matchup-deck-card.is-leader { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(242,205,69,.2); }
.public-matchup-deck-card img { width: 100%; height: 100%; object-fit: cover; }
.public-matchup-deck-card > b {
  position: absolute;
  right: 3px;
  bottom: 3px;
  min-width: 24px;
  padding: 3px 5px;
  border-radius: 999px;
  color: #17191d;
  background: var(--gold);
  box-shadow: 0 2px 8px rgba(0,0,0,.55);
  font-size: .7rem;
  line-height: 1;
  text-align: center;
}
.public-matchup-deck-card-fallback { padding: 5px; color: var(--muted); font-size: .62rem; font-weight: 800; overflow-wrap: anywhere; text-align: center; }
.public-matchup-opponents { border-top: 1px solid rgba(82,103,126,.55); }
.public-matchup-row {
  grid-template-columns: 40px minmax(130px, .65fr) minmax(160px, 1fr) minmax(230px, .75fr);
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 12px 8px;
}
.public-matchup-logged-opponent { min-width: 0; }
.public-matchup-logged-opponent > strong { color: var(--text); overflow-wrap: anywhere; }
.public-matchup-opponent { min-width: 0; }
.public-matchup-opponent > a,
.public-matchup-opponent > strong { color: var(--text); font-weight: 800; overflow-wrap: anywhere; }
.public-matchup-opponent > a:hover,
.public-matchup-opponent > a:focus-visible { color: var(--gold); }
.public-matchup-details {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
  min-width: 0;
}
.public-matchup-details > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}
.public-matchup-details small { color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.public-matchup-details strong { overflow-wrap: anywhere; }
.public-matchup-pagination { padding-top: 4px; }
.competitive-snapshot strong { font-size: 1.05rem; }
.competitive-event-row .ranking-movement,
.competitive-event-row .rating-delta { display: block; margin-top: 2px; color: var(--muted); font-size: .75rem; font-weight: 800; }
.competitive-event-row .ranking-movement.up,
.competitive-event-row .rating-delta.gain { color: #77d8bc; }
.competitive-event-row .ranking-movement.down,
.competitive-event-row .rating-delta.loss { color: #ff9b92; }
.competitive-event-row .ranking-movement.neutral,
.competitive-event-row .rating-delta.neutral { color: var(--muted); }
.competitive-event-row .rating-source-note { color: #d7bd5d; font-size: .68rem; }
.rating-replay-required { border-color: rgba(242,205,69,.35); background: rgba(242,205,69,.06); }

@media (max-width: 760px) {
  .competitive-history-filter,
  .competitive-profile-section .public-stat-grid { grid-template-columns: minmax(0, 1fr); }
  .competitive-profile-section .public-profile-priority { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .competitive-profile-section .public-profile-priority article:first-child { grid-column: auto; }
  .competitive-event-row {
    grid-template-columns: 52px minmax(0, 1fr) minmax(6.5rem, .42fr);
    align-items: start;
    gap: 12px;
    padding: 16px 0;
  }
  .competitive-event-main { grid-column: 2 / -1; }
  .competitive-deck { grid-column: 2 / -1; }
  .competitive-event-main a { display: inline-flex; align-items: center; min-height: 44px; }
  .competitive-snapshot { grid-column: span 1; }
  .competitive-event-row > .competitive-snapshot:nth-last-child(2) { grid-column: 2; }
  .competitive-event-row > .competitive-snapshot:last-child { grid-column: 3; }
  .public-matchups-heading { align-items: center; flex-direction: row; padding: 18px; }
  .public-matchups-heading .section-collapse-toggle { width: auto; margin-left: auto; }
  .public-matchups-body { padding: 0 18px 18px; }
  .public-matchup-row { grid-template-columns: 40px minmax(0, 1fr); align-items: start; }
  .public-matchup-logged-opponent,
  .public-matchup-opponent { grid-column: 2; }
  .public-matchup-details { grid-column: 2; }
  .public-matchup-tournament-deck { grid-template-columns: minmax(10rem,.48fr) minmax(0,1fr); }
}

@media (max-width: 430px) {
  .competitive-profile-section .public-profile-priority { grid-template-columns: minmax(0, 1fr); }
  .competitive-history-heading { align-items: flex-start; flex-direction: column; }
  .competitive-event-row { grid-template-columns: 46px minmax(0, 1fr); }
  .competitive-placement-badge { width: 44px; height: 44px; font-size: 1rem; }
  .competitive-event-main,
  .competitive-deck { grid-column: 2; }
  .competitive-event-row > .competitive-snapshot:nth-last-child(2),
  .competitive-event-row > .competitive-snapshot:last-child { grid-column: 1 / -1; }
  .competitive-snapshot { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(9,13,18,.45); }
  .rating-history-chart { padding: 8px 6px; }
  .rating-line-svg { height: auto; min-height: 220px; }
  .historical-deck-snapshot ul { grid-template-columns: minmax(0,1fr); }
  .public-matchup-tournament > summary { grid-template-columns: minmax(0, 1fr) 30px; gap: 10px; }
  .public-matchup-tournament > summary > span { grid-column: 1; grid-row: 2; white-space: normal; }
  .public-matchup-tournament > summary > b { grid-column: 2; grid-row: 1 / 3; }
  .public-matchups-heading .section-collapse-toggle > span { display: none; }
  .public-matchup-tournament-deck { grid-template-columns: minmax(0,1fr); }
  .public-matchup-deck-gallery { grid-template-columns: repeat(auto-fill,minmax(52px,1fr)); }
}

.match-data-panel > .match-data-selector { margin: 0 0 1rem; }
.match-data-selector { display: flex; align-items: end; flex-wrap: wrap; gap: .75rem; }
.match-data-selector label { flex: 1 1 22rem; }
.match-data-selector [role="status"] { flex-basis: 100%; color: var(--muted); }
.retired-definition-list { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .75rem; }
.retired-definition-list summary { cursor: pointer; font-weight: 800; }
.retired-definition-list article { display: flex; justify-content: space-between; gap: .75rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.retired-definition-list article span { display: grid; gap: .2rem; }
.retired-definition-list small { color: var(--muted); }
.retirement-impact dl { display: grid; gap: .55rem; margin: 0; }
.retirement-impact dl > div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: .45rem; }
.retirement-impact dt { color: var(--muted); }
.retirement-impact dd { margin: 0; text-align: right; font-weight: 800; }

@media (max-width: 560px) {
  .match-data-selector { align-items: stretch; }
  .match-data-selector > button { min-height: 44px; flex: 1 1 auto; }
  .retired-definition-list article { align-items: stretch; flex-direction: column; }
}

/* ISO-13.30: actionable, permission-scoped administration status. */
button.staff-attention-summary { font: inherit; cursor: pointer; }
button.staff-attention-summary:hover,
button.staff-attention-summary:focus-visible { border-color: var(--yellow); outline: 3px solid rgba(241,200,62,.25); outline-offset: 2px; }
.admin-queue-card.unavailable { opacity: .86; border-style: dashed; }
.admin-queue-card.unavailable strong { color: var(--muted); }
.admin-partial-warning { padding: .65rem .8rem; border-left: 3px solid var(--yellow); color: var(--muted); background: rgba(241,200,62,.08); }
.identity-review-history { margin: .65rem 0; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 10px; }
.identity-review-history summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 800; }
.identity-review-history dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; margin: .4rem 0 0; }
.identity-review-history dl > div { display: grid; gap: .2rem; }
.identity-review-history dt { color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.identity-review-history dd { margin: 0; }
@media (max-width: 560px) { .identity-review-history dl { grid-template-columns: 1fr; } }
.match-summary{grid-template-columns:repeat(4,minmax(0,1fr))}
.competitive-event-pagination{justify-content:center;margin-top:16px}
@media(max-width:900px){.match-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.match-summary{grid-template-columns:1fr}}
.verified-local-search{display:grid;gap:.35rem;margin-bottom:.75rem;color:var(--muted)}
.verified-local-search input{min-height:44px}
.verified-local-results{display:grid}
.identity-review-outcome{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:.5rem}
.duplicate-definition-warning{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem;margin-bottom:1rem;padding:.8rem;border:1px solid #b97832;border-radius:10px;background:rgba(185,120,50,.1)}
.duplicate-definition-warning span{flex:1 1 18rem;color:var(--muted)}
.accolade-definition-list{display:grid;gap:.5rem}
.accolade-definition-entry{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.45rem;align-items:center}
.accolade-definition-entry>.accolade-definition{width:100%}
.accolade-definition-actions{flex-wrap:nowrap}
.accolade-player-search{display:grid;gap:.35rem;margin:.75rem 0;color:var(--muted)}
.accolade-player-search input{min-height:44px}
.display-role-list{display:grid;grid-template-columns:minmax(18rem,.8fr) minmax(22rem,1.2fr);gap:1rem}
.display-role-library,.display-role-detail-panel{min-width:0;padding:1rem;border:1px solid var(--line);border-radius:12px;background:rgba(9,15,23,.42)}
.display-role-library-list{display:grid;gap:.5rem}
.display-role-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.5rem}
.display-role-row.selected{border-color:var(--yellow)}
.display-role-select{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.65rem;width:100%;padding:.65rem;border:0;color:inherit;text-align:left;background:transparent;cursor:pointer}
.display-role-select>span:nth-child(2){display:grid;gap:.2rem}
.display-role-select small{color:var(--muted)}
.display-role-detail{display:grid;gap:.65rem;margin:1rem 0 0}
.display-role-detail>div{display:grid;grid-template-columns:8rem 1fr;gap:.75rem;padding-top:.65rem;border-top:1px solid var(--line)}
.display-role-detail dt{color:var(--muted)}
.display-role-detail dd{margin:0}
.display-role-member-search{display:grid;gap:.35rem;margin:1rem 0}
.display-role-member-results{display:grid;gap:.5rem}
.display-role-member-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.7rem 0;border-top:1px solid var(--line)}
.display-role-member-row>div{display:grid;gap:.2rem;min-width:0}
.display-role-member-row small,.display-role-assignment-note{color:var(--muted)}
.display-role-assignment-note{display:block;margin-top:1rem}
@media(max-width:760px){.display-role-list{grid-template-columns:1fr}.display-role-select{grid-template-columns:auto minmax(0,1fr)}.display-role-select .role-state{grid-column:2}.display-role-row{grid-template-columns:1fr}.display-role-row>.inline-actions{justify-content:flex-end}}

/* Private competitive deck analysis. */
.deck-lab-workspace{display:grid;gap:.85rem}
.deck-lab-toolbar{display:grid;grid-template-columns:minmax(12rem,1fr) auto;align-items:end;gap:1rem;padding:0 0 .85rem;border-bottom:1px solid rgba(255,255,255,.08)}
.deck-lab-toolbar label,.deck-lab-editor-head label,.deck-lab-card-filter label{display:grid;gap:.35rem;color:var(--muted);font-size:.78rem;font-weight:700}
.deck-lab-toolbar label{min-width:0}
.deck-lab-toolbar select{min-height:44px}
.deck-lab-deck-picker{display:grid;grid-template-columns:minmax(18rem,22rem) max-content max-content;align-items:end;gap:.6rem;max-width:100%;margin:0}
.deck-lab-deck-picker :is(.quiet-button,.button){min-width:max-content;min-height:44px;padding-inline:1rem;white-space:nowrap}
.deck-lab-editor-head{display:grid;grid-template-columns:minmax(14rem,1fr) auto;align-items:end;gap:.75rem 1rem;padding:1rem;border:1px solid var(--line);border-radius:12px;background:rgba(9,15,23,.42)}
.deck-lab-editor-head input{min-height:44px}
.deck-lab-actions{display:flex;align-items:center;justify-content:flex-end;gap:.65rem}.deck-lab-action-group{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem}.deck-lab-action-group .button,.deck-lab-action-group .quiet-button{min-height:44px;white-space:nowrap}.deck-lab-action-group-danger{padding-left:.65rem;border-left:1px solid rgba(255,255,255,.1)}.deck-lab-editor-head>.save-state{grid-column:1/-1;margin:0;padding-top:.7rem;border-top:1px solid rgba(255,255,255,.08)}
.deck-lab-builder{display:grid;grid-template-columns:minmax(8.5rem,.72fr) minmax(0,7.28fr);gap:1rem;margin-top:1rem}
.deck-lab-leader-column,.deck-lab-main-deck{display:grid;align-content:start;gap:.65rem;min-width:0}.deck-lab-leader-column{padding-right:1rem;border-right:1px solid var(--line)}
.deck-lab-subhead{display:flex;align-items:baseline;gap:.45rem;min-height:2.1rem}.deck-lab-subhead .eyebrow{margin:0}.deck-lab-subhead strong{color:#fff}.deck-lab-subhead small{margin-left:auto;color:var(--muted);white-space:nowrap}
.deck-lab-main-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));align-items:start;gap:.55rem}
.deck-card-preview .card-visual-grid{grid-template-columns:repeat(8,minmax(0,1fr));align-items:start;gap:.55rem}
.deck-card-preview .card-visual{padding:.35rem}
.deck-card-preview .card-image-shell{min-height:0;aspect-ratio:4/5}
.deck-card-preview .card-image-shell img{height:100%;aspect-ratio:auto}
.submission-prerequisite-note{display:grid;gap:.2rem;padding:.75rem 1rem;border:1px solid #80641b;border-left:4px solid #dfbd39;border-radius:8px;background:#302916}.submission-prerequisite-note strong{color:#fff}.submission-prerequisite-note span{color:#e8edf2;font-size:.78rem}
.deck-lab-selected-card{position:relative;display:grid;align-content:start;gap:.42rem;min-width:0;padding:.48rem;border:1px solid var(--line);border-radius:10px;background:#11161c}
.deck-lab-main-card{gap:.25rem;padding:.35rem}.deck-lab-main-card .deck-lab-selected-art{aspect-ratio:4/5}.deck-lab-main-card .deck-lab-selected-copy small{display:none}.deck-lab-main-card .deck-lab-quantity .quiet-button{min-height:28px}
.deck-lab-leader-card{border-color:#80641b;background:linear-gradient(180deg,rgba(128,100,27,.14),#11161c)}
.deck-lab-selected-art{position:relative;display:grid;width:100%;aspect-ratio:600/838;overflow:hidden;border-radius:6px;background:#080c11;cursor:zoom-in}.deck-lab-selected-art img{width:100%;height:100%;object-fit:cover}.deck-lab-selected-art .card-art-placeholder{padding:.25rem;font-size:.52rem}.deck-lab-draft-zoom-toggle{display:inline-flex;align-items:center;gap:.4rem}.deck-lab-draft-zoom-toggle[aria-pressed="true"]{border-color:#d8b739;background:#302916}
@media(min-width:1101px) and (hover:hover) and (pointer:fine){.deck-lab-selected-card{--deck-lab-selected-preview-x:center;--deck-lab-selected-preview-y:center}.deck-lab-leader-card,.deck-lab-main-card:nth-child(8n+1){--deck-lab-selected-preview-x:left}.deck-lab-main-card:nth-child(8n){--deck-lab-selected-preview-x:right}.deck-lab-leader-card,.deck-lab-main-card:nth-child(-n+8){--deck-lab-selected-preview-y:top}.deck-lab-selected-card:hover,.deck-lab-selected-card:focus-within{z-index:30}.deck-lab-selected-art:hover,.deck-lab-selected-art:focus-visible{z-index:31;overflow:visible;transform:scale(2.4);transform-origin:var(--deck-lab-selected-preview-x) var(--deck-lab-selected-preview-y);box-shadow:0 16px 44px rgba(0,0,0,.78);transition:transform .16s ease,box-shadow .16s ease}.deck-lab-selected-art:focus-visible{outline:2px solid #dfbd39;outline-offset:2px}}
#deck-lab-current-panel.zoom-disabled .deck-lab-selected-art{cursor:default}#deck-lab-current-panel.zoom-disabled .deck-lab-selected-art:hover,#deck-lab-current-panel.zoom-disabled .deck-lab-selected-art:focus-visible{z-index:auto;overflow:hidden;transform:none;box-shadow:none;transition:none}
.deck-lab-selected-copy{display:grid;gap:.1rem;min-width:0}.deck-lab-selected-copy code{font-size:.63rem}.deck-lab-selected-card strong,.deck-lab-selected-card small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.deck-lab-selected-card small{color:var(--muted);font-size:.65rem}
.deck-lab-quantity{display:grid;grid-template-columns:1fr 1.4rem 1fr;align-items:center;gap:.2rem;text-align:center}.deck-lab-quantity .quiet-button{min-width:0;min-height:32px;padding:.25rem}
.deck-lab-empty-slot{display:grid;place-content:center;gap:.3rem;min-height:13rem;padding:.75rem;border:1px dashed var(--line);border-radius:10px;color:var(--muted);text-align:center}.deck-lab-empty-slot strong{color:#fff}
.deck-lab-card-browser{display:grid;gap:.65rem;padding:.8rem 1rem 1rem;border:1px solid var(--line);border-radius:12px;background:rgba(9,15,23,.42)}
.deck-lab-card-browser-head{display:flex;align-items:center;justify-content:space-between;gap:.75rem;min-height:0}.deck-lab-card-browser-head .eyebrow{margin:0}.deck-lab-card-browser #deck-lab-card-status{color:var(--muted);font-size:.78rem}
.deck-lab-card-filter{display:grid;gap:.55rem;padding:.65rem;border:1px solid rgba(255,255,255,.08);border-radius:10px;background:rgba(7,12,18,.38)}.deck-lab-filter-primary{display:grid;grid-template-columns:minmax(12rem,.9fr) minmax(21rem,1.35fr) minmax(17rem,1fr) minmax(17rem,.95fr);align-items:start;gap:.75rem}.deck-lab-filter-primary>*{min-width:0;align-content:start}.deck-lab-filter-search>input{min-height:40px}.deck-lab-display-filter{align-content:start}
.deck-lab-filter-group{display:grid;gap:.4rem;min-width:0;margin:0;padding:0;border:0}.deck-lab-filter-group legend{padding:0;color:var(--muted);font-size:.78rem;font-weight:700}.deck-lab-filter-group legend small{font-weight:500}.deck-lab-filter-options{display:flex;align-items:flex-start;align-content:flex-start;flex-wrap:wrap;gap:.35rem}.deck-lab-filter-options label{display:inline-flex;align-items:center;gap:.3rem;min-height:40px;padding:.3rem .48rem;border:1px solid var(--line);border-radius:8px;color:#e8ebef;background:#11161c;font-size:.7rem;cursor:pointer}.deck-lab-filter-options label:has(input:checked){border-color:#d8b739;background:#302916}.deck-lab-filter-options input{width:1rem;height:1rem;margin:0;accent-color:#dfbd39}
.deck-lab-filter-toggles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.4rem}.deck-lab-compact-toggle{display:flex!important;align-items:center;gap:.45rem;min-height:40px;padding:.4rem .5rem;border:1px solid var(--line);border-radius:9px;color:#e8ebef!important;background:#11161c;cursor:pointer;text-align:left}.deck-lab-compact-toggle:has(input:checked),.deck-lab-compact-toggle[aria-pressed="true"]{border-color:#d8b739;background:#302916}.deck-lab-compact-toggle input{flex:0 0 auto;width:1rem;height:1rem;margin:0;accent-color:#dfbd39}.deck-lab-zoom-toggle::before{content:'\2713';display:grid;place-items:center;flex:0 0 1rem;width:1rem;height:1rem;border:1px solid #626a74;border-radius:3px;color:transparent;font-size:.68rem;line-height:1}.deck-lab-zoom-toggle[aria-pressed="true"]::before{color:#181a1d;border-color:#dfbd39;background:#dfbd39}.deck-lab-compact-toggle span{display:grid;gap:.02rem;min-width:0}.deck-lab-compact-toggle strong{font-size:.68rem;white-space:nowrap}.deck-lab-compact-toggle small{overflow:hidden;color:var(--muted);font-size:.56rem;font-weight:500;text-overflow:ellipsis;white-space:nowrap}.deck-lab-advanced-filters{padding:.4rem .1rem 0;border-top:1px solid var(--line)}.deck-lab-advanced-filters>summary{display:flex;align-items:center;gap:.5rem;min-height:32px;color:#e8ebef;cursor:pointer;list-style:none;font-size:.72rem;font-weight:800}.deck-lab-advanced-filters>summary::-webkit-details-marker{display:none}.deck-lab-advanced-filters>summary small{color:var(--muted);font-size:.62rem;font-weight:500}.deck-lab-advanced-filters>summary::after{content:'+';margin-left:auto;color:#dfbd39;font-size:1rem}.deck-lab-advanced-filters[open]>summary::after{content:'−'}.deck-lab-advanced-filter-grid{display:grid;grid-template-columns:minmax(14rem,.9fr) minmax(14rem,.9fr) minmax(27rem,1.4fr);align-items:start;gap:.75rem;padding-top:.55rem}.deck-lab-numeric-filter{align-content:start;padding:.55rem;border:1px solid var(--line);border-radius:9px;background:rgba(17,22,28,.72)}.deck-lab-numeric-filter.is-active{border-color:#806f2d;background:rgba(48,41,22,.45)}.deck-lab-range-toolbar{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.deck-lab-range-enable{display:inline-flex!important;align-items:center;gap:.55rem;min-height:36px;color:#e8ebef;font-size:.72rem;font-weight:700;white-space:nowrap;cursor:pointer}.deck-lab-range-enable>input[type="checkbox"]{-webkit-appearance:none;appearance:none;display:grid;place-content:center;flex:0 0 1.35rem;width:1.35rem!important;min-width:1.35rem;height:1.35rem!important;min-height:1.35rem;margin:0;padding:0!important;border:1px solid #626a74;border-radius:4px;background:#11161c;cursor:pointer}.deck-lab-range-enable>input[type="checkbox"]::before{content:'\2713';color:#17191d;font:900 .88rem/1 "DM Sans",sans-serif;opacity:0}.deck-lab-range-enable>input[type="checkbox"]:checked{border-color:#dfbd39;background:#dfbd39}.deck-lab-range-enable>input[type="checkbox"]:checked::before{opacity:1}.deck-lab-range-toolbar output{min-width:3.5rem;color:#fff;font-size:.8rem;font-weight:900;text-align:right}.deck-lab-comparison-toggle{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.25rem}.deck-lab-comparison-toggle button{min-width:0;min-height:36px;padding:.25rem;border:1px solid var(--line);border-radius:7px;color:#e8ebef;background:#11161c;font:800 .8rem/1 "Space Grotesk",sans-serif;cursor:pointer}.deck-lab-comparison-toggle button:hover,.deck-lab-comparison-toggle button:focus-visible{border-color:#9d8732}.deck-lab-comparison-toggle button[aria-pressed="true"]{color:#17191d;border-color:#dfbd39;background:#dfbd39}.deck-lab-numeric-filter>input[type="range"]{width:100%;height:24px;margin:0;accent-color:#dfbd39;cursor:pointer}.deck-lab-numeric-filter>input[type="range"]:disabled{cursor:not-allowed;opacity:.35}.deck-lab-range-scale{display:flex;justify-content:space-between;color:var(--muted);font-size:.6rem}.deck-lab-association-filter-panel{display:grid;gap:.5rem;min-width:0}.deck-lab-association-filter-bottom{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(8rem,.7fr);gap:.6rem}.deck-lab-legality{display:inline-flex;width:max-content;max-width:100%;margin-top:.15rem;padding:.14rem .32rem;border-radius:999px;color:#fff;background:#655521;font-size:.52rem;font-weight:900;text-transform:uppercase}.deck-lab-legality.banned,.deck-lab-legality.rotated{background:#7b332e}
.deck-lab-card-results{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));align-items:start;gap:.4rem;overflow:visible}
.deck-lab-card-option{position:relative;display:grid;align-content:start;gap:.28rem;min-width:0;padding:.32rem;border:1px solid var(--line);border-radius:8px;background:#11161c}.deck-lab-card-option>div{display:grid;gap:.08rem;min-width:0}.deck-lab-card-option code{font-size:.54rem}.deck-lab-card-option strong,.deck-lab-card-option small{overflow:hidden;text-overflow:ellipsis}.deck-lab-card-option strong{font-size:.65rem;line-height:1.15;white-space:nowrap}.deck-lab-card-option small{color:var(--muted);font-size:.55rem;white-space:nowrap}
.card-official-reference{display:block;margin-top:.2rem;font-size:.62rem;line-height:1.2}
.deck-lab-card-art{position:relative;display:grid;width:100%;padding:0;aspect-ratio:600/838;overflow:hidden;border:1px solid var(--line);border-radius:6px;color:#fff;background:#080c11;cursor:pointer}.deck-lab-card-art img{width:100%;height:100%;object-fit:cover}.deck-lab-card-art:disabled{cursor:not-allowed;opacity:.68}
@media(min-width:1101px) and (hover:hover) and (pointer:fine){.deck-lab-card-option{--deck-lab-preview-x:center;--deck-lab-preview-y:center}.deck-lab-card-option:nth-child(-n+12){--deck-lab-preview-y:top}.deck-lab-card-option:nth-child(n+25){--deck-lab-preview-y:bottom}.deck-lab-card-option:nth-child(12n+1){--deck-lab-preview-x:left}.deck-lab-card-option:nth-child(12n){--deck-lab-preview-x:right}.deck-lab-card-option:hover,.deck-lab-card-option:focus-within{z-index:30}.deck-lab-card-option:hover .deck-lab-card-art,.deck-lab-card-option:focus-within .deck-lab-card-art{z-index:31;overflow:visible;transform:scale(3.6);transform-origin:var(--deck-lab-preview-x) var(--deck-lab-preview-y);box-shadow:0 16px 44px rgba(0,0,0,.78);transition:transform .16s ease,box-shadow .16s ease}.deck-lab-card-option:hover .deck-lab-card-art img,.deck-lab-card-option:focus-within .deck-lab-card-art img{border-radius:6px}.deck-lab-card-art:focus-visible{outline:2px solid #dfbd39;outline-offset:2px}}
.deck-lab-card-browser.zoom-disabled .deck-lab-card-option:hover .deck-lab-card-art,.deck-lab-card-browser.zoom-disabled .deck-lab-card-option:focus-within .deck-lab-card-art{overflow:hidden;transform:none;box-shadow:none;transition:none}
@media(prefers-reduced-motion:reduce){.deck-lab-card-art,.deck-lab-selected-art{transition:none!important}}
.deck-lab-output{display:grid;gap:1rem}
.deck-lab-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:1rem;border:1px solid var(--line);border-radius:12px;background:rgba(9,15,23,.42)}
.deck-lab-heading h3,.deck-lab-panel h3{margin:.2rem 0;color:#fff;font:700 1.25rem/1.2 "Space Grotesk",sans-serif}
.deck-lab-heading p:last-child{margin:0;color:var(--muted)}
.deck-lab-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem}
.deck-lab-metrics article{display:grid;gap:.2rem;padding:1rem;border:1px solid var(--line);border-radius:12px;background:#11161c}
.deck-lab-metrics small{color:var(--muted);font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em}
.deck-lab-metrics strong{color:#fff;font-size:1.65rem}
.deck-lab-metrics span{color:var(--muted);font-size:.75rem}
.deck-lab-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(18rem,.6fr);gap:1rem}
.deck-lab-panel{min-width:0;padding:1rem;border:1px solid var(--line);border-radius:12px;background:rgba(9,15,23,.42)}
.deck-lab-panel>.section-row{margin:0 0 .75rem}
#deck-lab-current-panel>.section-row>.inline-actions{display:flex;align-items:center;justify-content:flex-end;gap:.6rem;flex-wrap:wrap}
.deck-lab-panel>.section-row+.collapsible-section-body>.deck-lab-builder{margin-top:0}
.deck-lab-curve{display:grid;grid-template-columns:repeat(11,minmax(0,1fr));align-items:end;gap:.35rem;min-height:13rem;margin-top:1rem}
.deck-lab-curve>div{display:grid;grid-template-rows:8rem auto auto;gap:.25rem;align-items:end;text-align:center}
.deck-lab-curve>div>span{position:relative;display:block;height:8rem;border:1px solid var(--line);border-radius:7px 7px 3px 3px;background:#0e1319;overflow:hidden}
.deck-lab-curve i{position:absolute;inset:auto 0 0;height:var(--deck-lab-bar);min-height:2px;background:linear-gradient(180deg,#f2d35c,#b28b16)}
.deck-lab-curve strong{color:#fff;font-size:.75rem}.deck-lab-curve small{color:var(--muted)}
.deck-lab-composition{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem;margin:1rem 0 0}
.deck-lab-composition>div{display:grid;gap:.15rem;padding:.7rem;border:1px solid var(--line);border-radius:9px;background:#11161c}
.deck-lab-composition dt{color:var(--muted);font-size:.7rem}.deck-lab-composition dd{margin:0;color:#fff;font-size:1.15rem;font-weight:800}
.deck-lab-diagnostics{display:grid;gap:.6rem;margin-top:1rem}
.deck-lab-diagnostic{display:grid;grid-template-columns:3.5rem minmax(0,1fr);gap:.75rem;align-items:start;padding:.8rem;border:1px solid var(--line);border-radius:10px;background:#11161c}
.deck-lab-diagnostic>span{padding:.25rem .4rem;border-radius:999px;color:#fff;background:#56606d;font-size:.65rem;font-weight:900;text-align:center;text-transform:uppercase}
.deck-lab-diagnostic.critical{border-color:#7a4542}.deck-lab-diagnostic.critical>span{background:#7b332e}
.deck-lab-diagnostic.positive{border-color:#397c69}.deck-lab-diagnostic.positive>span{background:#256251}
.deck-lab-diagnostic.heuristic{border-color:#80641b}.deck-lab-diagnostic.heuristic>span{color:#17191d;background:#dfbd39}
.deck-lab-diagnostic strong{color:#fff}.deck-lab-diagnostic p{margin:.2rem 0 0;color:var(--muted);font-size:.8rem}
.deck-lab-evidence{display:grid;gap:1rem}.deck-lab-evidence-window{display:grid;gap:.3rem;min-width:10rem;color:var(--muted);font-size:.72rem;font-weight:700}.deck-lab-evidence-window select{min-height:40px}.deck-lab-evidence-note{margin:0;padding:.75rem 1rem;border-left:3px solid #dfbd39;color:var(--muted);background:rgba(223,189,57,.06);font-size:.82rem}.deck-lab-evidence-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.65rem}.deck-lab-evidence-metrics article{display:grid;gap:.2rem;padding:.85rem;border:1px solid var(--line);border-radius:10px;background:#11161c}.deck-lab-evidence-metrics small{color:var(--muted);font-size:.68rem;font-weight:800;text-transform:uppercase}.deck-lab-evidence-metrics strong{color:#fff;font-size:1.35rem}.deck-lab-evidence-metrics span{color:var(--muted);font-size:.72rem}.deck-lab-evidence-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem}.deck-lab-evidence-grid>section{min-width:0;padding:.85rem;border:1px solid var(--line);border-radius:10px;background:rgba(9,15,23,.45)}.deck-lab-evidence h4{margin:0 0 .65rem;color:#fff;font:700 1rem/1.2 "Space Grotesk",sans-serif}.deck-lab-evidence-row{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.65rem 0;border-top:1px solid var(--line)}.deck-lab-evidence-row:first-of-type{border-top:0}.deck-lab-evidence-row>span{display:grid;gap:.15rem;min-width:0}.deck-lab-evidence-row strong,.deck-lab-evidence-row small{overflow:hidden;text-overflow:ellipsis}.deck-lab-evidence-row small{color:var(--muted);font-size:.7rem}.deck-lab-evidence-row b{flex:0 0 auto;color:#fff;font-size:.75rem}.deck-lab-evidence-prompts{display:grid;gap:.25rem}
.deck-lab-context{display:grid;gap:1rem}.deck-lab-context-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.65rem}.deck-lab-context-metrics article{display:grid;gap:.2rem;padding:.85rem;border:1px solid var(--line);border-radius:10px;background:#11161c}.deck-lab-context-metrics small{color:var(--muted);font-size:.68rem;font-weight:800;text-transform:uppercase}.deck-lab-context-metrics strong{color:#fff;font-size:1.35rem}.deck-lab-context-metrics span,.deck-lab-context-footnote{color:var(--muted);font-size:.72rem}.deck-lab-context-list{display:grid;gap:.15rem;padding:.85rem;border:1px solid var(--line);border-radius:10px;background:rgba(9,15,23,.45)}.deck-lab-context-list h4{margin:0 0 .5rem;color:#fff}.deck-lab-context-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.7rem 0;border-top:1px solid var(--line)}.deck-lab-context-row>span{display:grid;gap:.12rem;min-width:0}.deck-lab-context-row small{color:var(--muted);font-size:.7rem}.deck-lab-context-row b{flex:0 0 auto;color:#fff;font-size:.78rem}.deck-lab-context-footnote{margin:0}
@media(max-width:1100px){.deck-lab-main-grid,.deck-card-preview .card-visual-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.deck-lab-card-results{grid-template-columns:repeat(8,minmax(0,1fr))}.deck-lab-filter-primary{grid-template-columns:repeat(2,minmax(0,1fr))}.deck-lab-advanced-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.deck-lab-association-filter-panel{grid-column:1/-1}}
@media(max-width:900px){.deck-lab-toolbar{grid-template-columns:1fr}.deck-lab-deck-picker{grid-template-columns:minmax(0,1fr) max-content max-content;width:100%}.deck-lab-editor-head{grid-template-columns:1fr}.deck-lab-actions{justify-content:flex-start}.deck-lab-action-group-danger{margin-left:auto}.deck-lab-builder{grid-template-columns:1fr}.deck-lab-leader-column{grid-template-columns:8rem minmax(0,1fr);padding:0 0 1rem;border-right:0;border-bottom:1px solid var(--line)}.deck-lab-leader-column .deck-lab-subhead{grid-column:1/-1}.deck-lab-main-grid,.deck-card-preview .card-visual-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.deck-lab-card-results{grid-template-columns:repeat(6,minmax(0,1fr))}.deck-lab-metrics,.deck-lab-evidence-metrics,.deck-lab-context-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.deck-lab-grid,.deck-lab-evidence-grid{grid-template-columns:1fr}}
@media(max-width:620px){.deck-lab-toolbar,.deck-lab-heading{align-items:stretch}.deck-lab-toolbar{padding-right:0}.deck-lab-deck-picker{grid-template-columns:1fr 1fr;align-items:stretch;max-width:none;margin-right:0}.deck-lab-deck-picker>label{grid-column:1/-1;width:100%}.deck-lab-deck-picker .quiet-button{width:100%}.deck-lab-toolbar label{min-width:0;width:100%}.deck-lab-actions{display:grid;gap:.6rem}.deck-lab-action-group{display:grid;grid-template-columns:1fr 1fr}.deck-lab-action-group .button,.deck-lab-action-group .quiet-button{width:100%}.deck-lab-action-group-danger{display:grid;grid-template-columns:1fr;margin-left:0;padding:0;padding-top:.6rem;border-left:0;border-top:1px solid rgba(255,255,255,.1)}.deck-lab-leader-column{grid-template-columns:7rem minmax(0,1fr)}.deck-lab-main-grid,.deck-card-preview .card-visual-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.deck-lab-card-filter{padding:.55rem}.deck-lab-filter-primary{grid-template-columns:1fr}.deck-lab-filter-search>input{min-height:44px}.deck-lab-advanced-filter-grid,.deck-lab-association-filter-bottom{grid-template-columns:1fr}.deck-lab-association-filter-panel{grid-column:auto}.deck-lab-filter-toggles{grid-template-columns:1fr 1fr}.deck-lab-card-results{grid-template-columns:repeat(2,minmax(0,1fr))}.deck-lab-metrics,.deck-lab-evidence-metrics,.deck-lab-context-metrics{grid-template-columns:1fr}.deck-lab-evidence .section-row,.deck-lab-context .section-row{align-items:stretch;flex-direction:column}.deck-lab-context .section-row>.flag{align-self:flex-start}.deck-lab-evidence-window{width:100%}.deck-lab-curve{gap:.18rem;overflow-x:auto}.deck-lab-curve>div{min-width:1.6rem}.deck-lab-diagnostic{grid-template-columns:1fr}.deck-lab-diagnostic>span{justify-self:start}.deck-lab-composition{grid-template-columns:1fr 1fr}.deck-lab-context-row{align-items:flex-start;flex-direction:column}.deck-lab-context-row b{font-size:.75rem}}
@media(max-width:420px){.deck-lab-main-grid,.deck-card-preview .card-visual-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.deck-lab-subhead{flex-wrap:wrap}.deck-lab-subhead small{width:100%;margin-left:0}}

.deck-lab-borrow-mode-toggle[aria-pressed="true"]{color:#17191d;border-color:#dfbd39;background:#dfbd39}.deck-lab-borrow-guide{display:flex;align-items:center;justify-content:space-between;grid-column:1/-1;gap:1rem;padding:.75rem 1rem;border:1px solid #806f2d;border-radius:9px;background:rgba(48,41,22,.62)}.deck-lab-borrow-guide strong{color:#f2cd45;white-space:nowrap}.deck-lab-borrow-guide span{color:#e1e5e9;font-size:.78rem}.deck-lab-selected-card.borrow-selected{border-color:#dfbd39;box-shadow:inset 0 0 0 1px rgba(223,189,57,.42);background:linear-gradient(180deg,rgba(75,62,22,.44),#11161c)}.deck-lab-borrow-quantity strong{display:flex;align-items:baseline;justify-content:center;gap:.08rem}.deck-lab-borrow-quantity strong small{display:inline;color:var(--muted);font-size:.58rem}.deck-lab-borrow-quantity .quiet-button:disabled{opacity:.38}.deck-lab-workspace.is-borrow-mode #deck-lab-output,.deck-lab-workspace.is-borrow-mode .deck-lab-card-browser{display:none}
@media(max-width:620px){.deck-lab-borrow-guide{align-items:flex-start;flex-direction:column;gap:.25rem}#deck-lab-current-panel.is-borrow-mode>.section-row>.inline-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}#deck-lab-current-panel.is-borrow-mode>.section-row>.inline-actions .flag{display:grid;place-items:center;min-height:44px}#deck-lab-current-panel.is-borrow-mode #deck-lab-review-borrow{grid-column:1/-1}}

/* Global, optional community-support entry point. */
main{padding-bottom:calc(72px + 5rem)}
.donation-ribbon{box-sizing:border-box;position:fixed;right:1rem;bottom:1rem;z-index:10040;display:flex;align-items:center;gap:1rem;width:min(28rem,calc(100vw - 2rem));padding:.65rem .7rem .65rem 1rem;border:1px solid #80641b;border-radius:14px;color:#f4f6f8;background:rgba(14,18,23,.97);box-shadow:0 16px 42px rgba(0,0,0,.52);backdrop-filter:blur(10px)}
.donation-ribbon>span{display:grid;gap:.1rem;min-width:0;margin-right:auto}.donation-ribbon strong{color:#fff;font-size:.82rem}.donation-ribbon small{color:#bdc5cf;font-size:.68rem}.donation-ribbon .button{flex:0 0 auto;min-height:40px;padding:.55rem .9rem}
.donation-dialog{width:min(720px,calc(100% - 28px))}.donation-dialog-content{display:grid;grid-template-columns:minmax(13rem,17rem) minmax(0,1fr);align-items:center;gap:1.5rem}.donation-dialog-content img{display:block;width:100%;height:auto;border:1px solid #454c56;border-radius:14px;background:#000}.donation-dialog-content>div{display:grid;gap:1rem;align-content:center}.donation-dialog-content p{margin:0;color:#e8ebef}.donation-dialog-content small{color:#aeb7c1;line-height:1.45}.donation-link{display:inline-flex;align-items:center;justify-content:center;width:max-content;max-width:100%;text-decoration:none}
.toast{bottom:6rem}
@media(max-width:620px){main{padding-bottom:calc(72px + 4.5rem)}.donation-ribbon{right:.5rem;bottom:.5rem;width:calc(100vw - 1rem);padding:.55rem .6rem .55rem .75rem}.donation-ribbon small{display:none}.donation-dialog-content{grid-template-columns:1fr;justify-items:center;text-align:center}.donation-dialog-content img{width:min(17rem,100%)}.donation-link{width:100%}.toast{bottom:5.25rem}}

/* The mobile navigation owns the viewport while open. Resetting its scroll
   position in app.js keeps Events visible, while this bounded touch scroller
   keeps every later destination reachable without the support ribbon overlap. */
@media(max-width:760px){
  body.menu-open{overflow:hidden}
  body.menu-open .main-nav{top:100%;justify-content:flex-start;max-height:calc(100dvh - 82px);overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;padding-bottom:calc(24px + env(safe-area-inset-bottom))}
  body.menu-open .donation-ribbon{visibility:hidden;opacity:0;pointer-events:none}
}
