.f2t-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(3, 7, 15, 0.94);
  padding: max(0.35rem, env(safe-area-inset-top))
    max(0.55rem, env(safe-area-inset-right))
    max(0.35rem, env(safe-area-inset-bottom))
    max(0.55rem, env(safe-area-inset-left));
  color: #f6f1df;
  display: grid;
  place-items: center;
}
.f2t-overlay[hidden] {
  display: none;
}
.f2t-dialog {
  width: min(100%, 58rem);
  height: min(100%, 25rem);
  overflow: hidden;
  border: 1px solid #b99a57;
  border-radius: 14px;
  background: #0c1722;
  box-shadow: 0 20px 60px #000;
  padding: 0.55rem 0.7rem;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 0.35rem;
}
.f2t-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}
.f2t-head h2 {
  font-size: clamp(1rem, 3vw, 1.35rem);
  margin: 0;
}
.f2t-meta {
  font-size: 0.72rem;
  color: #c7d2d9;
  white-space: nowrap;
}
.f2t-cards {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 0.5rem;
  align-items: center;
}
.f2t-cardline {
  display: flex;
  gap: 0.18rem;
  align-items: center;
  min-width: 0;
}
.f2t-card {
  display: inline-grid;
  place-items: center;
  min-width: 2.2rem;
  height: 2.85rem;
  padding: 0 0.15rem;
  border-radius: 5px;
  background: #f8f5ea;
  color: #13151b;
  font: bold 1rem/1 system-ui;
  box-shadow: 0 1px 3px #000;
}
.f2t-card.red {
  color: #b3222c;
}
.f2t-r2 {
  background: #24354a;
  color: #d8c48d;
}
.f2t-label {
  font-size: 0.68rem;
  color: #aebcc5;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.f2t-form {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 0.55rem;
  min-height: 0;
}
.f2t-counts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.3rem;
  align-content: start;
}
.f2t-field {
  display: grid;
  gap: 0.16rem;
  font-size: 0.7rem;
}
.f2t-field input,
.f2t-field select {
  width: 100%;
  min-width: 0;
  height: 2rem;
  border-radius: 6px;
  border: 1px solid #566676;
  background: #111f2d;
  color: #fff;
  padding: 0 0.4rem;
  font-size: 1rem;
}
.f2t-extras {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
  align-content: start;
}
.f2t-wide {
  grid-column: 1/-1;
}
.f2t-ranks {
  display: flex;
  gap: 0.2rem;
  flex-wrap: wrap;
}
.f2t-rank {
  display: grid;
  grid-template-columns: auto 3.8rem;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.65rem;
}
.f2t-rank select {
  height: 1.55rem;
  font-size: 0.66rem;
}
.f2t-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.45rem;
}
.f2t-actions button {
  min-height: 2.35rem;
  border-radius: 8px;
  padding: 0.35rem 0.8rem;
  font-weight: 800;
}
.f2t-submit {
  background: #c6a65b;
  color: #07101a;
  border: 0;
}
.f2t-submit:disabled {
  opacity: 0.4;
}
.f2t-skip {
  background: transparent;
  color: #dce5e9;
  border: 1px solid #73808b;
}
.f2t-error {
  margin-right: auto;
  color: #ffb6ae;
  font-size: 0.72rem;
}
.f2t-result {
  overflow: auto;
  font-size: 0.78rem;
}
.f2t-result table {
  border-collapse: collapse;
  width: 100%;
}
.f2t-result th,
.f2t-result td {
  padding: 0.2rem 0.35rem;
  text-align: right;
  border-bottom: 1px solid #263747;
}
.f2t-result th:first-child,
.f2t-result td:first-child {
  text-align: left;
}
@media (max-height: 370px) {
  .f2t-dialog {
    border-radius: 9px;
    padding: 0.35rem 0.5rem;
  }
  .f2t-card {
    height: 2.35rem;
    min-width: 1.9rem;
    font-size: 0.86rem;
  }
  .f2t-ranks {
    display: none;
  }
  .f2t-form {
    grid-template-columns: 1.25fr 1fr;
  }
  .f2t-head h2 {
    font-size: 1rem;
  }
}
