/* ITZA Tournament V19B6.7 — Marshal support, scoring and mobile viewport refinement */
:root {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.marshal-shell {
  min-height: 100dvh;
  overflow-x: clip;
}

.marshal-shell button,
.marshal-shell input,
.marshal-shell select,
.marshal-shell textarea {
  font: inherit;
}

.marshal-head {
  min-height: 60px;
  padding-top: max(10px, env(safe-area-inset-top));
}

.marshal-brand {
  min-width: 0;
}

.marshal-brand > span:last-child {
  min-width: 0;
}

.marshal-brand b,
.marshal-brand small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marshal-brand b {
  font-size: 15px;
  line-height: 1.2;
}

.marshal-brand small {
  font-size: 11px;
}

.marshal-main {
  gap: 12px;
  padding: 14px 14px calc(84px + env(safe-area-inset-bottom));
}

.marshal-shell .card {
  padding: 15px;
}

.marshal-shell .hero-card h1 {
  margin: 6px 0 7px;
  font-size: clamp(21px, 6vw, 27px);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.marshal-shell .hero-card p {
  font-size: 13px;
  line-height: 1.45;
}

.marshal-shell .hero-card > small,
.marshal-shell .card-head small,
.marshal-shell .status-row small {
  font-size: 11px;
  line-height: 1.35;
}

.marshal-shell .card h2 {
  font-size: 17px;
  line-height: 1.25;
}

/* The original selector sized both spans as icons and caused assignment text to escape. */
.marshal-shell .assignment-location > span:first-child {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 9px;
  color: var(--blue);
  background: #fff;
  font-size: 20px;
}

.marshal-shell .assignment-location > span:last-child {
  display: block;
  min-width: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  color: inherit;
  background: transparent;
  font-size: inherit;
  place-items: initial;
}

.marshal-shell .assignment-location b,
.marshal-shell .assignment-location small {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.marshal-shell .assignment-location b {
  font-size: 15px;
  line-height: 1.25;
}

.marshal-shell .assignment-location small {
  font-size: 11px;
  line-height: 1.35;
}

.marshal-shell .action {
  position: relative;
  min-width: 0;
  min-height: 100px;
  padding: 14px;
  overflow: hidden;
}

.marshal-shell .action strong {
  font-size: 14px;
  line-height: 1.25;
}

.marshal-shell .action small {
  font-size: 11px;
  line-height: 1.4;
}

body:has(.marshal-shell .modal-layer) {
  overflow: hidden;
}

.marshal-shell .modal-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: auto;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

.marshal-shell .sheet {
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.marshal-shell .sheet-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.marshal-shell .sheet-head .close {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 25px;
  line-height: 1;
}

.marshal-shell .capture-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 11px;
  border-radius: 10px;
  color: #315d83;
  background: #eff7ff;
  font-size: 11px;
  line-height: 1.45;
}

.marshal-shell .capture-note .material-symbols-rounded {
  flex: 0 0 auto;
  margin-top: 1px;
  font-size: 18px;
}

.marshal-shell .field,
.marshal-shell .choice-field {
  min-width: 0;
  margin: 0 0 15px;
}

.marshal-shell fieldset.field {
  padding: 0;
  border: 0;
}

.marshal-shell .field > span,
.marshal-shell .choice-field > legend {
  display: block;
  width: 100%;
  margin: 0 0 7px;
  padding: 0;
  color: #243f5f;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.marshal-shell .field input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
.marshal-shell .field select,
.marshal-shell .field textarea {
  min-height: 50px;
  padding: 12px 13px;
  border-color: #c7d6e5;
  border-radius: 11px;
  font-size: 16px;
  line-height: 1.35;
}

.marshal-shell .field textarea {
  min-height: 116px;
}

.marshal-shell .segmented-control,
.marshal-shell .choice-grid {
  display: grid;
  gap: 8px;
}

.marshal-shell .segmented-control {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px;
  border: 1px solid #c7d6e5;
  border-radius: 12px;
  background: #f3f7fb;
}

.marshal-shell .priority-control {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.marshal-shell .segmented-control label,
.marshal-shell .choice-grid label,
.marshal-shell .participant-choice-list label {
  position: relative;
  cursor: pointer;
}

.marshal-shell .segmented-control input,
.marshal-shell .choice-grid input,
.marshal-shell .participant-choice-list input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.marshal-shell .segmented-control label > span {
  display: grid;
  min-height: 43px;
  padding: 8px 6px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #516983;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.marshal-shell .segmented-control input:checked + span {
  border-color: #bcd4ed;
  color: #075cac;
  background: #fff;
  box-shadow: 0 2px 7px #12385b14;
}

.marshal-shell .segmented-control input:focus-visible + span,
.marshal-shell .choice-grid input:focus-visible + span,
.marshal-shell .participant-choice-list input:focus-visible + span {
  outline: 3px solid #9fc9f5;
  outline-offset: 2px;
}

.marshal-shell .request-types {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.marshal-shell .request-types label:last-child {
  grid-column: 1 / -1;
}

.marshal-shell .choice-grid label > span {
  display: grid;
  min-height: 48px;
  padding: 10px;
  place-items: center;
  border: 1px solid #c7d6e5;
  border-radius: 11px;
  color: #31506f;
  background: #fff;
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}

.marshal-shell .choice-grid input:checked + span {
  border-color: #0869e8;
  color: #075cac;
  background: #edf6ff;
  box-shadow: inset 0 0 0 1px #0869e8;
}

.marshal-shell .participant-choice-list {
  display: grid;
  gap: 8px;
  max-height: min(238px, 36dvh);
  padding: 3px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.marshal-shell .participant-choice-list label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid #c7d6e5;
  border-radius: 11px;
  color: #1d3857;
  background: #fff;
}

.marshal-shell .participant-choice-list label:has(input:checked) {
  border-color: #0869e8;
  background: #edf6ff;
  box-shadow: inset 0 0 0 1px #0869e8;
}

.marshal-shell .participant-choice-list label > span {
  min-width: 0;
}

.marshal-shell .participant-choice-list b,
.marshal-shell .participant-choice-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marshal-shell .participant-choice-list b {
  font-size: 14px;
}

.marshal-shell .participant-choice-list small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.marshal-shell .participant-choice-list i {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #adc2d5;
  border-radius: 999px;
  color: transparent;
  font-size: 16px;
  font-style: normal;
}

.marshal-shell .participant-choice-list input:checked ~ i {
  border-color: #0869e8;
  color: #fff;
  background: #0869e8;
}

.marshal-shell .evidence-grid {
  grid-template-columns: 1fr;
  gap: 9px;
}

.marshal-shell .evidence-grid .evidence-upload {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  justify-items: stretch;
  gap: 10px;
  min-height: 68px;
  padding: 11px;
  border: 1px solid #b9cfe2;
  border-radius: 12px;
  color: #204b72;
  background: #f5faff;
  text-align: left;
}

.marshal-shell .evidence-grid .evidence-upload.has-file {
  border-style: solid;
  border-color: #70c69d;
  background: #f0fbf6;
}

.marshal-shell .evidence-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  color: #0869e8;
  background: #e3f0ff;
  font-size: 22px;
  justify-self: start;
}

.marshal-shell .has-file .evidence-icon {
  color: #087442;
  background: #dff5e9;
}

.marshal-shell .evidence-copy {
  min-width: 0;
}

.marshal-shell .evidence-copy b,
.marshal-shell .evidence-copy small {
  display: block;
}

.marshal-shell .evidence-copy b {
  color: #1d3857;
  font-size: 13px;
  line-height: 1.25;
}

.marshal-shell .evidence-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
}

.marshal-shell .evidence-status {
  padding: 5px 7px;
  border-radius: 999px;
  color: #6c521a;
  background: #fff0c9;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  justify-self: end;
}

.marshal-shell .has-file .evidence-status {
  color: #087442;
  background: #dff5e9;
}

.marshal-shell .reconcile-option {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin: 1px 0 15px;
  padding: 12px;
  border: 1px solid #d5e0eb;
  border-radius: 11px;
  background: #f8fafc;
  cursor: pointer;
}

.marshal-shell .reconcile-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.marshal-shell .reconcile-option .check-ui {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #9fb4c8;
  border-radius: 6px;
  color: transparent;
  background: #fff;
  font-size: 17px;
}

.marshal-shell .reconcile-option input:checked + .check-ui {
  border-color: #0869e8;
  color: #fff;
  background: #0869e8;
}

.marshal-shell .reconcile-option b,
.marshal-shell .reconcile-option small {
  display: block;
}

.marshal-shell .reconcile-option b {
  color: #243f5f;
  font-size: 13px;
}

.marshal-shell .reconcile-option small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.marshal-shell .form-actions button {
  min-height: 48px;
  font-size: 14px;
}

.marshal-shell .field select {
  width: 100%;
  min-height: 48px;
  padding: 0 40px 0 13px;
  border: 1px solid #bfd0df;
  border-radius: 10px;
  color: #142f4c;
  background-color: #fff;
  font: inherit;
  font-size: 14px;
}

.marshal-shell .field-hint {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.marshal-shell .species-rules-panel {
  margin: 0 0 14px;
  overflow: hidden;
  border: 1px solid #b9d7f2;
  border-radius: 12px;
  background: #f2f8ff;
}

.marshal-shell .species-rules-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px 8px;
}

.marshal-shell .species-rules-title > .material-symbols-rounded {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: #0870cf;
  background: #dfefff;
  font-size: 20px;
}

.marshal-shell .species-rules-title b,
.marshal-shell .species-rules-title small {
  display: block;
}

.marshal-shell .species-rules-title b {
  color: #173e65;
  font-size: 13px;
}

.marshal-shell .species-rules-title small {
  margin-top: 2px;
  color: #58718a;
  font-size: 10px;
}

.marshal-shell .species-rules-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 12px;
  border-top: 1px solid #cfe2f3;
  color: #0766b5;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 750;
}

.marshal-shell .species-rules-panel summary::-webkit-details-marker {
  display: none;
}

.marshal-shell .species-rules-panel details[open] summary .material-symbols-rounded {
  transform: rotate(180deg);
}

.marshal-shell .species-rules-table {
  max-height: 260px;
  overflow: auto;
  border-top: 1px solid #cfe2f3;
  background: #fff;
}

.marshal-shell .species-rules-head,
.marshal-shell .species-rules-table > div:not(.species-rules-head) {
  display: grid;
  grid-template-columns: minmax(100px, 1.2fr) .7fr 1.45fr;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid #e4edf5;
}

.marshal-shell .species-rules-head {
  position: sticky;
  z-index: 1;
  top: 0;
  color: #60758b;
  background: #f7fafd;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.marshal-shell .species-rules-table > div:not(.species-rules-head) {
  color: #4f667d;
  font-size: 10px;
  line-height: 1.35;
}

.marshal-shell .species-rules-table b {
  color: #1b3c5d;
  font-size: 11px;
}

.marshal-shell .rules-warning,
.marshal-shell .score-preview {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
  padding: 11px 12px;
  border: 1px solid #d3dee8;
  border-radius: 12px;
}

.marshal-shell .rules-warning {
  color: #805e08;
  border-color: #efd589;
  background: #fff9e8;
}

.marshal-shell .rules-warning b,
.marshal-shell .rules-warning small,
.marshal-shell .score-preview b,
.marshal-shell .score-preview small,
.marshal-shell .score-preview em {
  display: block;
}

.marshal-shell .rules-warning b,
.marshal-shell .score-preview b {
  font-size: 13px;
  line-height: 1.3;
}

.marshal-shell .rules-warning small,
.marshal-shell .score-preview em {
  margin-top: 3px;
  font-size: 10px;
  font-style: normal;
  line-height: 1.4;
}

.marshal-shell .score-preview > .material-symbols-rounded {
  flex: 0 0 auto;
  font-size: 22px;
}

.marshal-shell .score-preview small {
  margin-bottom: 2px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
}

.marshal-shell .score-preview.is-pending {
  color: #365c7d;
  border-color: #bed8ee;
  background: #eff7ff;
}

.marshal-shell .score-preview.is-qualified {
  color: #087245;
  border-color: #98d8b9;
  background: #ecfbf4;
}

.marshal-shell .score-preview.is-not-qualified {
  color: #a33b3b;
  border-color: #efb9b9;
  background: #fff2f2;
}

@media (max-width: 560px) {
  .marshal-shell .modal-layer {
    display: block;
    inset: 0;
    height: auto;
    padding: 0;
  }

  .marshal-shell .sheet {
    position: fixed;
    inset: 0;
    width: 100%;
    height: auto;
    max-height: none;
    margin: 0;
    padding: 0 15px calc(16px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 0;
  }

  .marshal-shell .sheet-head {
    top: 0;
    margin: 0 -15px 15px;
    padding: 12px 15px;
    padding-top: max(12px, env(safe-area-inset-top));
    box-shadow: 0 5px 14px #173b5a10;
  }

  .marshal-shell .form-actions {
    position: sticky;
    z-index: 3;
    bottom: calc(-16px - env(safe-area-inset-bottom));
    margin: 18px -15px 0;
    padding: 12px 15px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid #d8e2ed;
    background: #fff;
    box-shadow: 0 -8px 20px #173b5a12;
  }

  .marshal-shell .form-actions > button {
    flex: 1 1 0;
    min-width: 0;
  }

  .marshal-shell .action-grid {
    grid-template-columns: 1fr;
  }

  .marshal-shell .action {
    grid-template-columns: 34px minmax(0, 1fr);
    column-gap: 11px;
    min-height: 82px;
    align-content: center;
  }

  .marshal-shell .action .symbol {
    grid-row: 1 / 3;
    align-self: center;
  }

  .marshal-shell .action strong,
  .marshal-shell .action small {
    grid-column: 2;
  }
}

@media (min-width: 561px) {
  .marshal-shell .sheet {
    max-height: min(760px, calc(100dvh - 48px));
  }
}
