* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --modal-backdrop-bg: rgba(6, 11, 16, 0.62);
  --modal-backdrop-blur: 10px;
  --desktop-shell-width: 1248px;
  --desktop-shell-gap: 12px;
  --desktop-main-width: 900px;
  --desktop-rail-width: 336px;
}

body {
  font-family:
    "Noto Sans SC", "Noto Sans Thai", "Noto Sans KR", Tahoma, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #1c272d;
  color: #e6edf3;
  padding: 0;
  /* Prevent pull-to-refresh on mobile */
  overscroll-behavior-y: contain;
}

.container {
  width: 100%;
  max-width: 900px;
  background: #1c272d;
  border-radius: 12px;
  padding: 0;
  margin: 0 auto 20px;
  text-align: center;
  overflow: visible;
}

.desktop-layout {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 20px;
}

.desktop-main {
  min-width: 0;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(31, 43, 50, 0.92);
}

.site-footer__inner {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 24px 16px 30px;
  color: #9dafc1;
  display: grid;
  gap: 12px;
}

.site-footer__disclaimer,
.site-footer__copyright,
.site-footer__contact {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.7;
}

.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  justify-content: space-between;
}

.site-footer__meta-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.site-footer__links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.8rem;
}

.site-footer a {
  color: #e8f1fb;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  text-decoration: underline;
}

.site-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #b6c1cb;
  opacity: 0.9;
}

.site-footer__social-link:hover,
.site-footer__social-link:focus-visible {
  color: #eef3f7;
  opacity: 1;
}

.site-footer__social-link:hover,
.site-footer__social-link:focus-visible {
  text-decoration: none;
}

.site-footer__social-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.legal-page {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 16px 40px;
}

.legal-page__inner {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(27, 36, 48, 0.96) 0%, rgba(18, 25, 34, 0.98) 100%);
}

.legal-page__eyebrow {
  margin: 0;
  color: #8ea2b5;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-page__title {
  margin: 0;
  font-size: clamp(1.8rem, 2.8vw, 2.4rem);
  font-weight: 800;
  line-height: 1.1;
}

.legal-page__intro {
  margin: 0;
  color: #c5d3e0;
  font-size: 1rem;
  line-height: 1.8;
}

.legal-page__section {
  display: grid;
  gap: 10px;
}

.legal-page__section h2 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
}

.legal-page__section p {
  margin: 0;
  color: #aebfd0;
  line-height: 1.8;
}

.legal-page__section a {
  color: #f0f7ff;
}

.public-plans-page {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 28px;
  padding: 18px 12px 0;
}

.public-plans-hero {
  margin-bottom: 14px;
}

.public-plans-hero__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.public-plans-hero__eyebrow {
  color: #8ea2b5;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
}

.public-plans-hero__title {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.15;
}

.public-plans-search {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.public-plans-search__panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: #1b2430;
  box-shadow: none;
}

.public-plans-inline-ad {
  width: 100%;
  margin: -2px 0 18px;
  display: grid;
  justify-items: center;
}

.public-plans-inline-ad__slot {
  display: none;
  width: 100%;
  justify-items: center;
}

.public-plans-inline-ad__slot--sm {
  display: grid;
}

.public-plans-inline-ad .squadmaker-ad-slot {
  width: 100%;
}

.public-plans-inline-ad .squadmaker-ad-slot--banner-sm {
  width: 320px;
  max-width: 320px;
  margin: 0 auto;
}

.public-plans-inline-ad .squadmaker-ad-slot--banner-md {
  width: 468px;
  max-width: 468px;
  margin: 0 auto;
}

.public-plans-inline-ad .squadmaker-ad-slot--banner-lg {
  width: 728px;
  max-width: 728px;
  margin: 0 auto;
}

.public-plans-search__heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.public-plans-search__eyebrow {
  color: #8ea2b5;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.public-plans-search__title {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.2;
}

.public-plans-search__bar {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 10px;
}

.public-plans-search__formation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 92px));
  gap: 10px;
}

.public-plans-search__field {
  display: block;
}

.public-plans-search__label {
  color: #9caebb;
  font-size: 0.78rem;
  font-weight: 600;
}

.public-plans-search__input,
.public-plans-search__select,
.public-plans-search__button,
.public-plans-search__reset {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #e6edf3;
}

.public-plans-search__input {
  width: 100%;
  padding: 0 14px;
  font-size: 0.95rem;
  outline: none;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

.public-plans-search__input::placeholder {
  color: #6f8595;
}

.public-plans-search__input:focus,
.public-plans-search__select:focus {
  border-color: rgba(31, 111, 235, 0.5);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.15);
}

.public-plans-search__select {
  width: 100%;
  padding: 0 40px 0 14px;
  font-size: 0.95rem;
  font-family: inherit;
  color-scheme: dark;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(230, 237, 243, 0.8) 50%),
    linear-gradient(135deg, rgba(230, 237, 243, 0.8) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.public-plans-search__select option {
  background: #1b232c;
  color: #e6edf3;
}

.public-plans-search__select optgroup {
  background: #1b232c;
  color: #e6edf3;
  font-style: normal;
  font-weight: 700;
}

.public-plans-search__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.public-plans-search__button {
  padding: 0 16px;
  font-size: 0.9rem;
  font-weight: 800;
  border: 1px solid rgba(255, 214, 79, 0.42);
  background: linear-gradient(180deg, #ffcf46 0%, #f0a716 100%);
  color: #1c1304;
  cursor: pointer;
}

.public-plans-search__reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(231, 48, 73, 0.72);
  background: #e73049;
  color: #fff;
}

.public-plans-search__reset--icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 8px;
  flex: 0 0 42px;
  line-height: 0;
}

.public-plans-search__reset--icon svg {
  display: block;
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
}

.public-plans-search__reset--icon:hover,
.public-plans-search__reset--icon:focus-visible {
  border-color: rgba(247, 72, 94, 0.86);
  background: #f0445c;
  color: #fff;
  outline: none;
}

.public-plans-search__field--compact .public-plans-search__input {
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.public-plans-search__field--compact .public-plans-search__input::-webkit-outer-spin-button,
.public-plans-search__field--compact .public-plans-search__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

@media (max-width: 720px) {
  .site-footer__meta {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .site-footer__links {
    gap: 6px;
  }

  .legal-page {
    padding-top: 20px;
  }

  .legal-page__inner {
    padding: 20px 16px;
  }

  .public-plans-search__bar {
    grid-template-columns: 1fr;
  }

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

  .public-plans-search__field--formation {
    grid-column: 1 / -1;
  }

  .public-plans-search {
    margin-inline: -12px;
  }

  .public-plans-search__panel {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .public-plans-inline-ad {
    margin: 0 -12px 18px;
  }
}

@media (min-width: 480px) and (max-width: 767px) {
  .public-plans-inline-ad__slot--sm {
    display: none;
  }

  .public-plans-inline-ad__slot--md {
    display: grid;
  }
}

@media (min-width: 768px) and (max-width: 1279px) {
  .public-plans-inline-ad__slot--sm,
  .public-plans-inline-ad__slot--md {
    display: none;
  }

  .public-plans-inline-ad__slot--lg {
    display: grid;
  }
}

.public-plans-list-section {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
}

.latest-public-plans {
  width: 100%;
  padding-top: 14px;
}

.public-plans-section-heading,
.latest-public-plans__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 12px;
  margin-bottom: 12px;
}

.public-plans-section-heading__title,
.latest-public-plans__title {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.latest-public-plans {
  max-width: none;
  margin: 0 0 18px;
  padding-inline: 12px;
}

.latest-public-plans__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  text-align: left;
}

.latest-public-plans__subtitle {
  color: #8ea2b5;
  font-size: 0.82rem;
}

.latest-public-plans__link {
  color: #d9f85f;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex: 0 0 auto;
}

.latest-public-plans__title {
  white-space: nowrap;
}

.latest-public-plans__link:hover,
.latest-public-plans__link:focus-visible {
  color: #efffb0;
}

.public-plans-status,
.latest-public-plans__status {
  min-height: 18px;
  margin-bottom: 0;
  padding: 10px 12px 0;
  color: #8ea2b5;
  font-size: 0.84rem;
}

.public-plans-status[hidden],
.latest-public-plans__status[hidden] {
  display: none;
}

.public-plans-list,
.latest-public-plans__list {
  display: flex;
  flex-direction: column;
}

.public-plans-table {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: rgba(18, 25, 33, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

.public-plans-table__accent {
  order: 2;
  height: 3px;
  background: rgba(214, 154, 16, 0.92);
}

.public-plans-table__head {
  order: 1;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 88px;
  gap: 12px;
  align-items: center;
  padding: 8px 12px 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(43, 52, 61, 0.95);
  color: rgba(233, 239, 244, 0.82);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.public-plans-table__head-spacer {
  display: block;
}

.public-plans-table__head-label {
  display: block;
  white-space: nowrap;
}

.public-plans-table__head-label--plan {
  text-align: left;
}

.public-plans-table__head-label--formation {
  text-align: right;
}

.public-plans-list {
  order: 4;
  gap: 0;
}

.latest-public-plans__list {
  order: 4;
  gap: 0;
}

.public-plans-status,
.latest-public-plans__status {
  order: 3;
}

.public-plan-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 88px;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 12px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  text-align: left;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.public-plan-item:nth-child(odd) {
  background: rgba(255, 255, 255, 0.022);
}

.public-plan-item:nth-child(even) {
  background: rgba(255, 255, 255, 0.045);
}

.public-plan-item:hover,
.public-plan-item:focus-visible {
  background: rgba(255, 255, 255, 0.065);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.public-plan-item__media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.public-plan-item__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.public-plan-item__avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f4f9fc;
  font-weight: 700;
  font-family: "Barlow Condensed", sans-serif;
}

.public-plan-item__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 4px;
  align-items: flex-start;
}

.public-plan-item__creator,
.public-plan-item__meta-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-plan-item__title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: clip;
}

.public-plan-item__title {
  font-size: 0.96rem;
  font-weight: 500;
  line-height: 1.28;
  padding-bottom: 1px;
  color: #f2f6fa;
}

.public-plan-item__creator,
.public-plan-item__meta-label {
  color: #8ea2b5;
  font-size: 0.78rem;
}

.public-plan-item__meta-label {
  display: none;
}

.public-plan-item__creator {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  min-width: 0;
}

.public-plan-item__creator-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 0 1 auto;
}

.public-plan-item__creator-stats {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
  margin-left: 8px;
}

.public-plan-item__stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #9fb0be;
}

.public-plan-item__stat-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.public-plan-item__stat--views .public-plan-item__stat-icon {
  color: #5dbbff;
}

.public-plan-item__stat--likes .public-plan-item__stat-icon {
  color: #ffbf5e;
}

.public-plan-item__stat-value {
  font-variant-numeric: tabular-nums;
}

.public-plan-item__meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  text-align: right;
  align-items: flex-end;
}

.public-plan-item__meta--formation {
  min-width: 0;
}

.public-plan-item__meta-value--formation,
.public-plan-item__meta-value--fp {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1;
}

.public-plan-item__meta-value--fp {
  color: #f05af5;
}

.public-plans-table--compact .public-plan-item {
  min-height: 58px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.public-plans-table--compact .public-plan-item__title {
  font-size: 0.92rem;
}

.public-plans-table--compact .public-plan-item__avatar {
  width: 38px;
  height: 38px;
}

.public-plans-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.public-plans-pagination__link {
  color: #d9f85f;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.public-plans-pagination__link:hover,
.public-plans-pagination__link:focus-visible {
  color: #efffb0;
}

.public-plans-pagination__pages {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.public-plans-pagination__page,
.public-plans-pagination__ellipsis {
  min-width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
}

.public-plans-pagination__page {
  border: 1px solid rgba(217, 248, 95, 0.22);
  background: rgba(11, 17, 23, 0.84);
  color: #d9f85f;
  text-decoration: none;
}

.public-plans-pagination__page:hover,
.public-plans-pagination__page:focus-visible {
  border-color: rgba(239, 255, 176, 0.42);
  color: #efffb0;
}

.public-plans-pagination__page--current {
  border-color: rgba(217, 248, 95, 0.6);
  background: linear-gradient(135deg, rgba(217, 248, 95, 0.2), rgba(217, 248, 95, 0.08));
  color: #f7ffd4;
}

.public-plans-pagination__ellipsis {
  color: #9caebb;
}

@media (max-width: 720px) {
  .public-plans-search {
    grid-template-columns: 1fr;
  }

  .public-plans-search__panel {
    padding: 14px;
  }

  .public-plans-section-heading,
  .latest-public-plans__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .latest-public-plans__header {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .latest-public-plans__copy {
    gap: 0;
  }

  .latest-public-plans__title {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .latest-public-plans__link {
    margin-left: auto;
  }

  .public-plan-item {
    grid-template-columns: 44px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 8px;
    padding: 10px 8px;
    min-height: 56px;
  }

  .public-plan-item__meta {
    min-width: 0;
    text-align: right;
  }

  .public-plan-item__avatar {
    width: 36px;
    height: 36px;
  }

  .public-plan-item__creator {
    width: 100%;
  }

  .public-plan-item__creator-stats {
    gap: 6px;
    margin-left: 6px;
  }

  .public-plan-item__meta-label {
    font-size: 0.68rem;
  }

  .public-plan-item__meta-value {
    font-size: 0.9rem;
  }

  .public-plans-pagination {
    gap: 8px;
  }

  .public-plans-pagination__link,
  .public-plans-pagination__page,
  .public-plans-pagination__ellipsis {
    font-size: 0.76rem;
  }

  .public-plans-pagination__page,
  .public-plans-pagination__ellipsis {
    min-width: 30px;
    height: 30px;
    border-radius: 9px;
  }
}

.top-shell {
  width: 100%;
  overflow: visible;
}

.hdr {
  display: flex;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 300;
  background: #181818;
  backdrop-filter: blur(6px);
}

.hdr-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  min-height: 40px;
  padding: 4px 12px;
}

.hdr-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hdr-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hdr-shortcuts {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hdr-shortcut {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 32px;
  color: inherit;
  text-decoration: none;
}

.hdr-shortcut::before {
  content: "";
  display: block;
  transition:
    background-color 0.18s ease,
    filter 0.18s ease,
    opacity 0.18s ease,
    transform 0.18s ease;
}

.hdr-shortcut:hover::before,
.hdr-shortcut:focus-visible::before {
  transform: translateY(-1px);
}

.hdr-shortcut:focus-visible {
  outline: 2px solid rgba(255, 240, 0, 0.5);
  outline-offset: 2px;
  border-radius: 6px;
}

.hdr-shortcut--squadmaker::before {
  width: 30px;
  height: 30px;
  background-color: #848484;
  -webkit-mask: url("../images/squadmaker.svg") no-repeat center;
  mask: url("../images/squadmaker.svg") no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.hdr-shortcut--squadmaker:hover::before,
.hdr-shortcut--squadmaker:focus-visible::before {
  background-color: #d9f85f;
}

.hdr-shortcut--fo4sq::before {
  width: 37px;
  height: 37px;
  background-color: #999;
  -webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg id='Layer_1' data-name='Layer 1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60.97 47.28'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:none%7D%3C/style%3E%3C/defs%3E%3Cpath d='M43.32 31.29a1 1 0 00-.43-1.95 1 1 0 00-.76 1.2 1 1 0 001 .78zm-.86-3.91a1 1 0 10-.46-1.94 1 1 0 00.24 2 1 1 0 00.22-.06zM45.15 37a1 1 0 00.54 1.84 1.09 1.09 0 00.54-.16 1 1 0 00.3-1.39 1 1 0 00-1.38-.29zm-.1-3.09a1 1 0 00-1.25-.66 1 1 0 00.3 2 1 1 0 00.29 0 1 1 0 00.66-1.34zm-19.76-5.69a1 1 0 00-.17 2h.08a1 1 0 00.09-2zM21 35.52a1 1 0 00.69 1.72 1 1 0 00.69-.28A1 1 0 1021 35.52zm3.47-3.39a1 1 0 00-1.34.45 1 1 0 00.45 1.34A1 1 0 0024 34a1 1 0 00.44-1.89z' transform='translate(-3.55 -4.61)'/%3E%3Cpath d='M10.51 35.38l-2.13 2.14-2.14-2.14-1.41 1.42 2.13 2.13-2.13 2.13 1.41 1.42 2.14-2.14 2.13 2.14 1.41-1.42-2.13-2.13 2.13-2.13-1.41-1.42z'/%3E%3Ccircle cx='8.37' cy='19.12' r='1'/%3E%3Cpath d='M11.93 30.29a3.84 3.84 0 103.84 3.84 3.84 3.84 0 00-3.84-3.84zm0 5.68a1.84 1.84 0 111.84-1.84A1.84 1.84 0 0111.93 36zM49 39.42a1 1 0 10-.33 1.94 1 1 0 00.94-.66 1 1 0 00-.61-1.28zM11.93 28.47a1 1 0 00.71-.29 1 1 0 00.29-.71 1 1 0 00-.29-.7 1 1 0 00-1.42 0 1 1 0 00-.29.7 1 1 0 00.29.71 1 1 0 00.71.29z' transform='translate(-3.55 -4.61)'/%3E%3Cpath d='M53.71 32.84l-2.13 2.13-2.13-2.13-1.42 1.42 2.13 2.13-2.13 2.13 1.42 1.41 2.13-2.13 2.13 2.14 1.41-1.42-2.13-2.13 2.13-2.13-1.41-1.42z'/%3E%3Cpath d='M22.36 10.18A3.84 3.84 0 1026.2 14a3.85 3.85 0 00-3.84-3.82zm0 5.68A1.84 1.84 0 1124.2 14a1.84 1.84 0 01-1.84 1.86zm-10.43 1.37a1 1 0 00.71-1.7 1 1 0 00-1.42 0 1 1 0 00-.29.71 1 1 0 001 1z' transform='translate(-3.55 -4.61)'/%3E%3Ccircle cx='31.62' cy='13.39' r='1'/%3E%3Cpath d='M38.83 20.3a1 1 0 10-.65-.25 1 1 0 00.65.25z' transform='translate(-3.55 -4.61)'/%3E%3Ccircle cx='8.37' cy='15.37' r='1'/%3E%3Cpath d='M55.13 35.43a3.84 3.84 0 10-3.84-3.84 3.85 3.85 0 003.84 3.84zm0-5.68a1.84 1.84 0 11-1.84 1.84 1.84 1.84 0 011.84-1.84z' transform='translate(-3.55 -4.61)'/%3E%3Cpath class='cls-1' d='M21.66 21.83l1.41-1.42 2.13 2.14 2.13-2.14 1.42 1.42L27.62 23H40.1a1 1 0 011.9-.8 1 1 0 010 .8h8.14V6.61H41v7.78H27V6.61h-9V23h4.81z' transform='translate(-3.55 -4.61)'/%3E%3Cpath class='cls-1' d='M25.49 2h9.99v5.79h-9.99z'/%3E%3Cpath class='cls-1' d='M34 38.24a11.6 11.6 0 00-11.56 11.59h23.19A11.61 11.61 0 0034 38.24z' transform='translate(-3.55 -4.61)'/%3E%3Cpath class='cls-1' d='M52.09 25H27.61l1.14 1.13-1.42 1.42-2.13-2.18-2.13 2.13-1.41-1.41L22.79 25H16V6.61H5.55v43.22h14.89a13.6 13.6 0 0127.19 0h14.89V6.61H52.09z' transform='translate(-3.55 -4.61)'/%3E%3Cpath d='M3.55 4.61v47.28h61V4.61zm25.45 2h10v5.78H29zm-11 0h9v7.78h14V6.61h9.06V23H42a1 1 0 000-.76 1 1 0 00-1.9.76H27.62l1.13-1.13-1.42-1.42-2.13 2.1-2.13-2.14-1.41 1.42L22.79 23H18zm4.46 43.22a11.6 11.6 0 0123.19 0zm40.08 0H47.63a13.6 13.6 0 00-27.19 0H5.55V6.61H16V25h6.81l-1.13 1.13 1.41 1.41 2.13-2.13 2.13 2.14 1.42-1.42L27.61 25h24.48V6.61h10.43z' transform='translate(-3.55 -4.61)'/%3E%3C/svg%3E")
    no-repeat center;
  mask: url("data:image/svg+xml;charset=utf-8,%3Csvg id='Layer_1' data-name='Layer 1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60.97 47.28'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:none%7D%3C/style%3E%3C/defs%3E%3Cpath d='M43.32 31.29a1 1 0 00-.43-1.95 1 1 0 00-.76 1.2 1 1 0 001 .78zm-.86-3.91a1 1 0 10-.46-1.94 1 1 0 00.24 2 1 1 0 00.22-.06zM45.15 37a1 1 0 00.54 1.84 1.09 1.09 0 00.54-.16 1 1 0 00.3-1.39 1 1 0 00-1.38-.29zm-.1-3.09a1 1 0 00-1.25-.66 1 1 0 00.3 2 1 1 0 00.29 0 1 1 0 00.66-1.34zm-19.76-5.69a1 1 0 00-.17 2h.08a1 1 0 00.09-2zM21 35.52a1 1 0 00.69 1.72 1 1 0 00.69-.28A1 1 0 1021 35.52zm3.47-3.39a1 1 0 00-1.34.45 1 1 0 00.45 1.34A1 1 0 0024 34a1 1 0 00.44-1.89z' transform='translate(-3.55 -4.61)'/%3E%3Cpath d='M10.51 35.38l-2.13 2.14-2.14-2.14-1.41 1.42 2.13 2.13-2.13 2.13 1.41 1.42 2.14-2.14 2.13 2.14 1.41-1.42-2.13-2.13 2.13-2.13-1.41-1.42z'/%3E%3Ccircle cx='8.37' cy='19.12' r='1'/%3E%3Cpath d='M11.93 30.29a3.84 3.84 0 103.84 3.84 3.84 3.84 0 00-3.84-3.84zm0 5.68a1.84 1.84 0 111.84-1.84A1.84 1.84 0 0111.93 36zM49 39.42a1 1 0 10-.33 1.94 1 1 0 00.94-.66 1 1 0 00-.61-1.28zM11.93 28.47a1 1 0 00.71-.29 1 1 0 00.29-.71 1 1 0 00-.29-.7 1 1 0 00-1.42 0 1 1 0 00-.29.7 1 1 0 00.29.71 1 1 0 00.71.29z' transform='translate(-3.55 -4.61)'/%3E%3Cpath d='M53.71 32.84l-2.13 2.13-2.13-2.13-1.42 1.42 2.13 2.13-2.13 2.13 1.42 1.41 2.13-2.13 2.13 2.14 1.41-1.42-2.13-2.13 2.13-2.13-1.41-1.42z'/%3E%3Cpath d='M22.36 10.18A3.84 3.84 0 1026.2 14a3.85 3.85 0 00-3.84-3.82zm0 5.68A1.84 1.84 0 1124.2 14a1.84 1.84 0 01-1.84 1.86zm-10.43 1.37a1 1 0 00.71-1.7 1 1 0 00-1.42 0 1 1 0 00-.29.71 1 1 0 001 1z' transform='translate(-3.55 -4.61)'/%3E%3Ccircle cx='31.62' cy='13.39' r='1'/%3E%3Cpath d='M38.83 20.3a1 1 0 10-.65-.25 1 1 0 00.65.25z' transform='translate(-3.55 -4.61)'/%3E%3Ccircle cx='8.37' cy='15.37' r='1'/%3E%3Cpath d='M55.13 35.43a3.84 3.84 0 10-3.84-3.84 3.85 3.85 0 003.84 3.84zm0-5.68a1.84 1.84 0 11-1.84 1.84 1.84 1.84 0 011.84-1.84z' transform='translate(-3.55 -4.61)'/%3E%3Cpath class='cls-1' d='M21.66 21.83l1.41-1.42 2.13 2.14 2.13-2.14 1.42 1.42L27.62 23H40.1a1 1 0 011.9-.8 1 1 0 010 .8h8.14V6.61H41v7.78H27V6.61h-9V23h4.81z' transform='translate(-3.55 -4.61)'/%3E%3Cpath class='cls-1' d='M25.49 2h9.99v5.79h-9.99z'/%3E%3Cpath class='cls-1' d='M34 38.24a11.6 11.6 0 00-11.56 11.59h23.19A11.61 11.61 0 0034 38.24z' transform='translate(-3.55 -4.61)'/%3E%3Cpath class='cls-1' d='M52.09 25H27.61l1.14 1.13-1.42 1.42-2.13-2.18-2.13 2.13-1.41-1.41L22.79 25H16V6.61H5.55v43.22h14.89a13.6 13.6 0 0127.19 0h14.89V6.61H52.09z' transform='translate(-3.55 -4.61)'/%3E%3Cpath d='M3.55 4.61v47.28h61V4.61zm25.45 2h10v5.78H29zm-11 0h9v7.78h14V6.61h9.06V23H42a1 1 0 000-.76 1 1 0 00-1.9.76H27.62l1.13-1.13-1.42-1.42-2.13 2.1-2.13-2.14-1.41 1.42L22.79 23H18zm4.46 43.22a11.6 11.6 0 0123.19 0zm40.08 0H47.63a13.6 13.6 0 00-27.19 0H5.55V6.61H16V25h6.81l-1.13 1.13 1.41 1.41 2.13-2.13 2.13 2.14 1.42-1.42L27.61 25h24.48V6.61h10.43z' transform='translate(-3.55 -4.61)'/%3E%3C/svg%3E")
    no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.hdr-shortcut--fo4sq:hover::before,
.hdr-shortcut--fo4sq:focus-visible::before {
  background-color: #fff000;
}

.hdr-shortcut--fo4tax::before {
  width: 30px;
  height: 30px;
  background-image: url("https://fifaaddict.com/ffaddv2/img/b2d4d43.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.hdr-shortcut--fo4tax:hover::before,
.hdr-shortcut--fo4tax:focus-visible::before {
  filter: brightness(1.12);
}

.hdr-logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: #b4ff00;
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
}

.hdr-logo span {
  font-weight: 400;
}

.hdr-lang {
  position: relative;
  z-index: 400;
}

.hdr-lang[open] .lang-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hdr-lang > summary {
  list-style: none;
}

.hdr-lang > summary::-webkit-details-marker {
  display: none;
}

.lang-btn {
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  min-height: 28px;
  list-style: none;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #ddd;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s;
  line-height: 1;
  user-select: none;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.lang-dropdown {
  position: absolute;
  top: 110%;
  left: 0;
  background: #1c272d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px 0;
  min-width: 200px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 400;
  display: flex;
  flex-direction: column;
}

.lang-dropdown.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  border: 0;
  background: transparent;
  color: #ccc;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 0.9em;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.lang-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.lang-item.active {
  color: #b4ff00;
  font-weight: 600;
}

.lang-flag-img {
  width: 20px;
  height: 14px;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}

.lang-separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 4px 0;
}

.header-controls-bar {
  display: flex;
  justify-content: center;
  padding: 8px 16px 10px;
  background: #1c272d;
}

.header-controls-inner {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.header-controls-actions {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.header-controls-actions .formation-select {
  border-radius: 8px;
}

.header-controls-actions .squad-level-toggle {
  border-radius: 8px;
}

.header-controls-actions .card-view-toggle {
  border-radius: 8px;
}

.header-controls-actions .header-clear-squad-btn {
  border-radius: 8px;
}

.header-controls-actions .header-squad-action-btn--share-home {
  border-radius: 8px;
}

.header-controls-actions--share-only {
  align-items: stretch;
  flex-wrap: wrap;
}

.header-controls-actions--share-only .header-share-pill {
  border-radius: 8px;
}

.header-controls-actions--share-only .card-view-toggle {
  border-radius: 8px;
}

.header-controls-actions--share-only .header-squad-action-btn--share-home {
  border-radius: 8px;
}

.header-share-pill {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(244, 248, 251, 0.92);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.header-share-pill__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(188, 201, 212, 0.72);
}

.header-share-pill__value {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f7fbfe;
}

.header-squad-action-btn {
  appearance: none;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    rgba(205, 81, 66, 0.92),
    rgba(150, 46, 36, 0.92)
  );
  color: #fff8f3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease,
    opacity 0.18s ease;
  box-shadow: 0 8px 18px rgba(106, 26, 19, 0.28);
}

#editSaveSquadButton {
  min-width: 150px;
}

.header-squad-action-btn__icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.header-squad-action-btn:hover,
.header-squad-action-btn:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.header-squad-action-btn--secondary {
  background: rgba(13, 19, 24, 0.82);
  color: rgba(241, 246, 251, 0.9);
  box-shadow: none;
}

.header-squad-action-btn--share-home {
  margin-left: auto;
  border-color: rgba(146, 234, 124, 0.26);
  background: linear-gradient(
    135deg,
    rgba(72, 168, 84, 0.96),
    rgba(35, 118, 57, 0.96)
  );
  color: #f6fff3;
  box-shadow: 0 8px 18px rgba(18, 71, 30, 0.28);
}

.header-squad-action-btn--share-home:hover,
.header-squad-action-btn--share-home:focus-visible {
  box-shadow: 0 10px 22px rgba(18, 71, 30, 0.34);
}

.header-squad-action-btn:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
  box-shadow: none;
}

#editSaveSquadButton.is-saved {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.11);
  color: rgba(236, 241, 246, 0.78);
  opacity: 1;
  box-shadow: none;
}

.header-clear-squad-btn {
  appearance: none;
  margin-left: auto;
  min-height: 34px;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(13, 19, 24, 0.82);
  color: rgba(241, 246, 251, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

.header-clear-squad-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.header-clear-squad-btn:hover,
.header-clear-squad-btn:focus-visible {
  background: rgba(151, 55, 52, 0.18);
  border-color: rgba(244, 118, 108, 0.42);
  color: #fff4f4;
  box-shadow: 0 0 0 2px rgba(214, 86, 79, 0.16);
}

.header-clear-squad-btn:disabled {
  opacity: 0.45;
  cursor: default;
  box-shadow: none;
}

.header-summary-strip {
  width: 100%;
}

.header-summary-inner {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(150px, 176px) minmax(0, 1fr) minmax(
      168px,
      196px
    );
  gap: 8px;
}

.summary-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.055),
      rgba(255, 255, 255, 0.02)
    ),
    rgba(8, 14, 18, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 6px 14px rgba(0, 0, 0, 0.16);
  padding: 8px 10px;
}

.summary-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.28),
    transparent 70%
  );
  pointer-events: none;
}

.summary-card--fp {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.summary-card--ovr {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.summary-card--team-color {
  grid-column: 3;
  width: 100%;
  min-width: 0;
  padding: 8px 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.team-color-strip {
  grid-column: 3;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-self: stretch;
  justify-content: flex-start;
  gap: 4px;
  min-height: 44px;
  z-index: 1;
}

.team-color-strip .summary-card__head {
  margin-bottom: 2px;
}

.team-color-note-button {
  appearance: none;
  border: 1px solid rgba(230, 237, 243, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 249, 252, 0.86);
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  font-family: "Barlow Condensed", "Noto Sans Thai", sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.team-color-note-button:hover,
.team-color-note-button:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  transform: translateY(-1px);
}

.team-color-items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.team-color-item,
.team-color-strip .summary-edit-icon {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(230, 237, 243, 0.64);
  min-width: 44px;
  height: 32px;
  padding: 0 7px;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: "Barlow Condensed", "Noto Sans Thai", sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    opacity 0.18s ease;
}

.team-color-item__icon,
.team-color-strip .summary-edit-icon img {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  object-fit: contain;
  opacity: 0.72;
}

.team-color-strip .summary-edit-icon + .summary-edit-icon {
  border-left: 1px solid rgba(230, 237, 243, 0.22);
}

.team-color-item__value,
.team-color-strip .summary-edit-icon span {
  min-width: 10px;
  text-align: center;
}

.team-color-item.is-active,
.team-color-strip .summary-edit-icon.is-active {
  background: transparent;
  color: rgba(242, 247, 251, 0.92);
}

.team-color-item:disabled,
.team-color-strip .summary-edit-icon:disabled {
  color: rgba(230, 237, 243, 0.34);
}

.team-color-item:disabled img,
.team-color-strip .summary-edit-icon:disabled img {
  opacity: 0.34;
}

.team-color-item.is-loading,
.team-color-strip .summary-edit-icon.is-loading {
  opacity: 0.52;
  pointer-events: none;
}

.team-color-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 160px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(12, 20, 26, 0.97);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.34);
  z-index: 20;
}

.team-color-detail-overlay {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop-bg);
  backdrop-filter: blur(var(--modal-backdrop-blur));
  -webkit-backdrop-filter: blur(var(--modal-backdrop-blur));
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 1200;
}

.team-color-detail-overlay.active {
  display: flex;
}

.team-color-note-overlay {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop-bg);
  backdrop-filter: blur(var(--modal-backdrop-blur));
  -webkit-backdrop-filter: blur(var(--modal-backdrop-blur));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    visibility 0.18s ease;
}

.team-color-note-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.squad-library-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: var(--modal-backdrop-bg);
  backdrop-filter: blur(var(--modal-backdrop-blur));
  -webkit-backdrop-filter: blur(var(--modal-backdrop-blur));
  z-index: 1090;
}

.squad-library-overlay.active {
  display: flex;
}

.squad-library-modal {
  position: relative;
  width: 100%;
  max-width: 1180px;
  min-height: min(720px, calc(100dvh - 16px));
  height: min(720px, calc(100dvh - 16px));
  max-height: min(720px, calc(100dvh - 16px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 20px 20px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, #27303d 0%, #202733 100%);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.42);
  border-bottom: none;
}

.squad-library-modal::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 120px;
  background:
    radial-gradient(
      circle at 12% 10%,
      rgba(180, 255, 0, 0.16),
      transparent 34%
    ),
    radial-gradient(circle at 86% 0%, rgba(255, 214, 79, 0.16), transparent 30%);
  opacity: 0.8;
  pointer-events: none;
}

.squad-library-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(
      180deg,
      rgba(48, 58, 73, 0.92) 0%,
      rgba(40, 51, 66, 0.88) 100%
    ),
    rgba(28, 36, 47, 0.95);
}

.squad-library-header__copy {
  min-width: 0;
}

.squad-library-heading {
  margin: 0;
  color: #fff6ee;
  font-size: clamp(1.28rem, 1.08rem + 0.8vw, 1.85rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.squad-library-subtitle {
  max-width: 560px;
  margin: 8px 0 0;
  color: rgba(224, 232, 237, 0.7);
  font-size: 0.94rem;
  line-height: 1.5;
}

.squad-library-close {
  appearance: none;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(237, 244, 248, 0.72);
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.squad-library-close:hover,
.squad-library-close:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  transform: rotate(90deg);
}

.squad-library-body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(330px, 0.9fr) minmax(420px, 1.1fr);
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #212934 0%, #1d242d 100%);
}

.squad-library-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(
      180deg,
      rgba(37, 48, 60, 0.96) 0%,
      rgba(30, 39, 50, 0.98) 100%
    ),
    #222b36;
}

.squad-library-current-plan {
  padding: 11px 13px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 214, 79, 0.16), rgba(180, 255, 0, 0.07)),
    rgba(255, 214, 79, 0.08);
  border: 1px solid rgba(255, 214, 79, 0.32);
  color: #fff1ba;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.squad-library-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: rgba(244, 247, 250, 0.9);
  font-size: 0.9rem;
  font-weight: 700;
}

.squad-library-field input,
.squad-library-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(7, 12, 16, 0.78);
  color: #fff;
  font: inherit;
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.squad-library-field input:focus,
.squad-library-field textarea:focus {
  border-color: rgba(180, 255, 0, 0.52);
  background: rgba(5, 10, 14, 0.9);
  box-shadow: 0 0 0 3px rgba(180, 255, 0, 0.12);
}

.squad-library-field textarea {
  min-height: 118px;
  padding: 12px 14px;
  resize: vertical;
}

.squad-library-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(226, 235, 239, 0.84);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

.squad-library-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.squad-library-save,
.squad-library-refresh,
.squad-library-item__action {
  appearance: none;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.squad-library-save:hover,
.squad-library-save:focus-visible,
.squad-library-refresh:hover,
.squad-library-refresh:focus-visible,
.squad-library-item__action:hover,
.squad-library-item__action:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.2);
}

.squad-library-save {
  width: 100%;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 52%, #c2410c 100%);
  color: #fff8f3;
  box-shadow:
    0 16px 32px rgba(194, 65, 12, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.squad-library-refresh,
.squad-library-item__action {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(244, 247, 250, 0.88);
}

.squad-library-status {
  min-height: 44px;
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(226, 235, 239, 0.82);
  font-size: 0.88rem;
  line-height: 1.45;
}

.squad-library-status[data-tone="error"] {
  background: rgba(173, 46, 34, 0.18);
  color: #ffd8d0;
}

.squad-library-status[data-tone="success"] {
  background: rgba(39, 118, 76, 0.2);
  color: #d5ffe9;
}

.squad-library-status[data-tone="info"] {
  background: rgba(62, 104, 157, 0.18);
  color: #d8ebff;
}

.squad-library-section {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 10px;
  padding: 18px 20px 20px;
  background: linear-gradient(180deg, #212934 0%, #1d242d 100%);
  overflow: hidden;
}

.squad-library-list {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 0;
  overflow: auto;
  min-height: 0;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.squad-library-list::-webkit-scrollbar {
  width: 4px;
}

.squad-library-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.squad-library-list::-webkit-scrollbar-track {
  background: transparent;
}

.squad-library-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 6px 8px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.squad-library-item:hover,
.squad-library-item:focus-within {
  background: rgba(255, 255, 255, 0.04);
}

.squad-library-item[data-is-active="true"]:hover,
.squad-library-item[data-is-active="true"]:focus-within {
  background: rgba(255, 214, 79, 0.1);
}

.squad-library-item[data-is-active="true"] {
  background: rgba(255, 214, 79, 0.08);
  box-shadow: inset 2px 0 0 rgba(255, 214, 79, 0.65);
}

.squad-library-item__meta {
  min-width: 0;
  overflow: hidden;
}

.squad-library-item__title {
  color: #fff8f3;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.squad-library-item__summary {
  margin-top: 1px;
  color: rgba(221, 230, 235, 0.72);
  font-size: 0.74rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.squad-library-item__summary--muted {
  color: rgba(194, 205, 214, 0.58);
  font-size: 0.7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.squad-library-item__actions {
  display: grid;
  grid-template-columns: auto repeat(4, max-content);
  align-items: center;
  gap: 7px;
  justify-content: end;
  min-width: 0;
}

.squad-library-item__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(227, 102, 76, 0.18);
  color: #ffd7ce;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.squad-library-item__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 11px;
  font-size: 0.77rem;
  white-space: nowrap;
}

.squad-library-item__action-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.squad-library-item__action--danger {
  color: #ffb8b0;
}

.squad-library-overlay[data-mode="save"] .squad-library-modal {
  max-width: 520px;
  min-height: auto;
  height: auto;
  max-height: calc(100dvh - 24px);
}

.squad-library-overlay[data-mode="save"] .squad-library-body {
  display: block;
  overflow: visible;
}

.squad-library-overlay[data-mode="save"] .squad-library-form {
  border-right: 0;
}

.squad-library-overlay[data-mode="save"] .squad-library-section {
  display: none;
}

.squad-library-overlay[data-mode="list"] .squad-library-modal {
  max-width: 760px;
}

.squad-library-overlay[data-mode="list"] .squad-library-body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.squad-library-overlay[data-mode="list"] .squad-library-form {
  display: none;
}

.squad-library-overlay[data-mode="list"] .squad-library-section {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

.squad-library-overlay[data-mode="list"] .squad-library-list {
  flex: 1 1 auto;
  min-height: 0;
}

.squad-library-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
}

.squad-library-selection-summary {
  min-width: 0;
  color: rgba(226, 235, 239, 0.72);
  font-size: 0.82rem;
  font-weight: 700;
}

.squad-library-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.squad-library-toolbar-btn {
  appearance: none;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(244, 247, 250, 0.9);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.squad-library-toolbar-btn--danger {
  color: #ffd1ca;
  background: rgba(173, 46, 34, 0.18);
  border-color: rgba(255, 126, 111, 0.18);
}

.squad-library-toolbar-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.squad-library-empty,
.squad-library-item {
  min-height: 54px;
}

.squad-library-empty {
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.squad-library-item {
  grid-template-columns: 28px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 10px;
}

.squad-library-item__select {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 100%;
  cursor: pointer;
}

.squad-library-item__select input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.squad-library-item__select span {
  width: 17px;
  height: 17px;
  border-radius: 5px;
  border: 1px solid rgba(226, 235, 239, 0.34);
  background: rgba(5, 10, 14, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.squad-library-item__select input:checked + span {
  border-color: rgba(180, 255, 0, 0.7);
  background:
    linear-gradient(135deg, rgba(180, 255, 0, 0.9), rgba(255, 214, 79, 0.92)),
    #b4ff00;
}

.squad-library-item__select input:checked + span::after {
  content: "";
  display: block;
  width: 8px;
  height: 4px;
  margin: 4px auto 0;
  border: solid #111820;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
}

.squad-library-item__title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex-wrap: nowrap;
}

.squad-library-item__title {
  font-size: 0.92rem;
  min-width: 0;
}

.squad-library-item__load {
  appearance: none;
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff8f3;
  text-decoration: none;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.squad-library-item__load:hover,
.squad-library-item__load:focus-visible {
  color: #d7ff7d;
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.squad-library-item__summary {
  margin-top: 1px;
  font-size: 0.74rem;
  line-height: 1.25;
}

.squad-library-item__summary--muted {
  font-size: 0.7rem;
}

.squad-library-item__badge {
  flex: 0 0 auto;
  min-height: 22px;
  padding: 0 8px;
  font-size: 0.66rem;
}

.squad-library-item__badge--public {
  background: rgba(102, 227, 129, 0.18);
  color: #cff7d8;
}

.squad-library-item__badge--private {
  background: rgba(227, 102, 76, 0.18);
  color: #ffd7ce;
}

.squad-library-item__share-link {
  appearance: none;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(244, 247, 250, 0.82);
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.squad-library-item__share-link:hover,
.squad-library-item__share-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(180, 255, 0, 0.28);
  background: rgba(180, 255, 0, 0.08);
  color: #eefbd8;
}

.squad-library-item__share-link:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.squad-library-item__share-link svg {
  width: 15px;
  height: 15px;
}

@media (max-width: 720px) {
  .squad-library-modal {
    border-radius: 18px 18px 0 0;
  }

  .squad-library-body {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }

  .squad-library-form {
    flex: 0 0 auto;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .squad-library-section {
    flex: 1 1 auto;
    min-height: 280px;
  }

  .squad-library-list {
    overflow: visible;
  }

  .squad-library-item {
    grid-template-columns: 28px minmax(0, 1fr) 34px;
  }

  .squad-library-item__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .squad-library-item__action {
    width: 100%;
  }
}

.shared-squad-dialog-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: var(--modal-backdrop-bg);
  backdrop-filter: blur(var(--modal-backdrop-blur));
  -webkit-backdrop-filter: blur(var(--modal-backdrop-blur));
  z-index: 1220;
}

.shared-squad-dialog-overlay.active {
  display: flex;
}

.shared-squad-dialog-modal {
  width: min(100%, 392px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    rgba(28, 37, 45, 0.985),
    rgba(16, 22, 28, 0.985)
  );
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.42);
  overflow: hidden;
}

.shared-squad-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 14px;
}

.shared-squad-dialog-header__copy {
  min-width: 0;
}

.shared-squad-dialog-title {
  margin: 0;
  font-family: "Barlow Condensed", "Noto Sans Thai", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #f4f8fb;
  line-height: 1.1;
}

.shared-squad-dialog-message {
  margin: 8px 0 0;
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(223, 232, 238, 0.84);
}

.shared-squad-dialog-close {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #a7b1be;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.shared-squad-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 18px 18px;
}

.shared-squad-dialog-cancel,
.shared-squad-dialog-confirm {
  appearance: none;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.shared-squad-dialog-cancel {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(239, 245, 249, 0.88);
}

.shared-squad-dialog-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.shared-squad-dialog-cancel:hover,
.shared-squad-dialog-cancel:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.shared-squad-dialog-confirm {
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.shared-squad-dialog-confirm--danger {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(228, 112, 103, 0.42);
  background: linear-gradient(
    180deg,
    rgba(176, 63, 57, 0.94),
    rgba(131, 39, 36, 0.96)
  );
  color: #fff7f7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.shared-squad-dialog-confirm--danger:hover,
.shared-squad-dialog-confirm--danger:focus-visible {
  border-color: rgba(244, 130, 121, 0.58);
  background: linear-gradient(
    180deg,
    rgba(193, 72, 66, 0.96),
    rgba(144, 42, 39, 0.98)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 2px rgba(214, 86, 79, 0.14);
}

.shared-squad-dialog-confirm--warning {
  border: 1px solid rgba(226, 168, 76, 0.42);
  background: linear-gradient(
    180deg,
    rgba(190, 137, 48, 0.95),
    rgba(146, 96, 29, 0.97)
  );
  color: #fff8ec;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.shared-squad-dialog-confirm--warning:hover,
.shared-squad-dialog-confirm--warning:focus-visible {
  border-color: rgba(240, 190, 100, 0.62);
  background: linear-gradient(
    180deg,
    rgba(205, 150, 55, 0.97),
    rgba(158, 104, 32, 0.99)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 2px rgba(210, 160, 70, 0.14);
}

.team-color-detail-modal {
  width: min(100%, 460px);
  max-height: min(78vh, 720px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: linear-gradient(
    180deg,
    rgba(27, 36, 44, 0.98),
    rgba(17, 23, 29, 0.98)
  );
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.team-color-note-modal {
  width: min(100%, 460px);
  max-height: min(72vh, 560px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: linear-gradient(
    180deg,
    rgba(27, 36, 44, 0.98),
    rgba(17, 23, 29, 0.98)
  );
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.team-color-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.team-color-detail-title {
  margin: 0;
  font-family: "Barlow Condensed", "Noto Sans Thai", sans-serif;
  font-size: 1.26rem;
  font-weight: 700;
  color: #f2f7fb;
}

.team-color-detail-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(230, 237, 243, 0.84);
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}

.team-color-detail-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.team-color-detail-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 18px 18px;
}

.team-color-note-body {
  padding: 16px 18px 18px;
}

.team-color-note-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: rgba(230, 237, 243, 0.86);
  line-height: 1.6;
}

.team-color-note-item {
  margin: 0;
}

.team-color-detail-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.team-color-detail-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.team-color-detail-card__identity {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.team-color-detail-card__icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: contain;
}

.team-color-detail-card__icon--placeholder {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.team-color-detail-card__text {
  min-width: 0;
}

.team-color-detail-card__name {
  font-size: 1rem;
  font-weight: 700;
  color: #f4f8fb;
  line-height: 1.3;
}

.team-color-detail-card__meta {
  margin-top: 2px;
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(223, 234, 241, 0.72);
}

.team-color-detail-card__rewards {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.team-color-detail-reward {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-family: "Barlow Condensed", "Noto Sans Thai", sans-serif;
}

.team-color-detail-reward__name {
  font-size: 1rem;
  font-weight: 600;
  color: #edf5fa;
}

.team-color-detail-reward__value {
  font-size: 1rem;
  font-weight: 700;
  color: #59bdff;
}

.team-color-detail-card__players {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.team-color-detail-player {
  width: 46px;
  height: 46px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.team-color-detail-player__face {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-color-detail-player--inactive .team-color-detail-player__face {
  filter: grayscale(1);
  opacity: 0.28;
}

@media (min-width: 601px) {
  .team-color-detail-overlay {
    align-items: flex-start;
    padding-top: 56px;
  }

  .shared-squad-dialog-overlay {
    align-items: flex-start;
    padding-top: 84px;
  }
}

.summary-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.summary-card__eyebrow {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(214, 230, 240, 0.74);
}

.summary-edit-icon {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(230, 237, 243, 0.6);
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.18s ease;
}

.summary-edit-icon svg {
  width: 12px;
  height: 12px;
}

.summary-edit-icon:hover {
  color: #d8edf7;
}

.summary-fp-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: "Barlow Condensed", "Noto Sans Thai", sans-serif;
  line-height: 1;
}

.summary-fp-max-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.summary-fp-value #fpCurrentValue {
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 800;
  color: #31b8f2;
  transition: color 0.18s ease;
}

.summary-fp-value #fpMaxValue,
.summary-fp-divider {
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  font-weight: 600;
  color: rgba(230, 237, 243, 0.72);
  transition: color 0.18s ease;
}

.summary-fp-input {
  width: 46px;
  height: 20px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(9, 17, 22, 0.95);
  color: #f7fafc;
  font-family: "Barlow Condensed", "Noto Sans Thai", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  display: none;
  -moz-appearance: textfield;
}

.summary-fp-input.is-editing {
  display: inline-block;
}

.summary-fp-input::-webkit-outer-spin-button,
.summary-fp-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.summary-card--fp.is-editing #fpMaxValue,
.summary-card--fp.is-editing #fpMaxEditBtn {
  display: none;
}

.summary-fp-caption {
  margin-top: 3px;
  margin-bottom: 6px;
  font-size: 0.58rem;
  color: rgba(214, 230, 240, 0.58);
}

.summary-bar {
  position: relative;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.summary-bar__fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #31b8f2 0%, #6ee7f9 55%, #f7fbff 100%);
  box-shadow: 0 0 18px rgba(49, 184, 242, 0.34);
  transition: width 0.25s ease;
}

.summary-card--fp.is-over-limit #fpCurrentValue {
  color: #ff7a7a;
  text-shadow: 0 0 14px rgba(255, 122, 122, 0.24);
}

.summary-card--fp.is-over-limit #fpMaxValue,
.summary-card--fp.is-over-limit .summary-fp-divider,
.summary-card--fp.is-over-limit .summary-fp-caption {
  color: rgba(255, 196, 196, 0.82);
}

.summary-card--fp.is-over-limit .summary-bar__fill {
  background: linear-gradient(90deg, #ff6b6b 0%, #ff8b73 55%, #ffd2c4 100%);
  box-shadow: 0 0 18px rgba(255, 107, 107, 0.32);
}

.summary-ovr-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.summary-ovr-rows {
  display: grid;
}

.summary-ovr-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
}

.summary-ovr-bar {
  position: relative;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.summary-ovr-bar__fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  transition:
    width 0.25s ease,
    filter 0.18s ease;
}

.summary-ovr-bar__fill--fw {
  background: linear-gradient(90deg, #ff4d6d 0%, #ff6b86 100%);
}

.summary-ovr-bar__fill--mf {
  background: linear-gradient(90deg, #14c97f 0%, #31e6a6 100%);
}

.summary-ovr-bar__fill--df {
  background: linear-gradient(90deg, #4495ff 0%, #74b8ff 100%);
}

.summary-ovr-value {
  text-align: right;
  font-size: 0.78rem;
  font-weight: 700;
  color: #f7fafc;
  transition: color 0.18s ease;
}

.summary-ovr-total-wrap {
  min-width: 48px;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.summary-ovr-total {
  font-family: "Barlow Condensed", "Noto Sans Thai", sans-serif;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-weight: 800;
  line-height: 0.95;
  color: #31b8f2;
  transition: color 0.18s ease;
}

.squad-level-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e6edf3;
  cursor: pointer;
}

.squad-level-toggle__label {
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.squad-level-toggle__label {
  min-width: 24px;
}

.squad-level-toggle__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.squad-level-toggle__slider {
  position: relative;
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease;
  cursor: pointer;
}

.squad-level-toggle__slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f8fafc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}

.squad-level-toggle__input:checked + .squad-level-toggle__slider {
  background: linear-gradient(135deg, #f5cf52 0%, #d9a91d 100%);
}

.squad-level-toggle__input:checked + .squad-level-toggle__slider::after {
  transform: translateX(16px);
}

.summary-ovr-value.summary-value-changed,
.summary-ovr-total.summary-value-changed {
  color: #7dd9ff;
}

.summary-ovr-bar__fill.summary-value-changed {
  filter: brightness(1.1);
}

.formation-select {
  background: rgba(255, 255, 255, 0.08);
  color: #eef3f8;
  border: 1px solid rgba(255, 255, 255, 0.16);
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.formation-select optgroup {
  background: #161b22;
  color: #e6edf3;
}

.formation-select option {
  background: #161b22;
  color: #e6edf3;
}

.card-view-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e6edf3;
  cursor: pointer;
  user-select: none;
}

.card-view-toggle__label {
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.card-view-toggle__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.card-view-toggle__slider {
  position: relative;
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease;
}

.card-view-toggle__slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f8fafc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}

.card-view-toggle__input:checked + .card-view-toggle__slider {
  background: linear-gradient(135deg, #f5cf52 0%, #d9a91d 100%);
}

.card-view-toggle__input:checked + .card-view-toggle__slider::after {
  transform: translateX(16px);
}

.pitch-container {
  position: relative;
  width: 100%;
  overflow: visible;
}

.pitch-actions-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0 2px;
}

.pitch-actions-bar--hidden {
  display: none !important;
}

.pitch-actions-alert {
  margin-top: 12px;
  padding: 16px 18px;
  border: 2px solid #ff3b30;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 46, 46, 0.98) 0%, rgba(175, 0, 0, 0.98) 100%);
  color: #fff6f6;
  box-shadow:
    0 18px 42px rgba(255, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  text-align: center;
}

.pitch-actions-alert__title {
  display: block;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pitch-actions-alert__message {
  margin: 8px 0 0;
  line-height: 1.55;
}

.pitch-actions-bar--edit {
  position: relative;
  padding: 14px 12px 4px;
  border-radius: 0 0 12px 12px;
  overflow: visible;
}

.pitch-actions-bar--edit > * {
  position: relative;
  z-index: 1;
}

.pitch-actions-bar--edit::before {
  content: "";
  position: absolute;
  top: 2px;
  right: 0;
  bottom: -8px;
  left: 0;
  border-radius: 0 0 12px 12px;
  background:
    linear-gradient(180deg, rgba(6, 10, 14, 0.2) 0%, rgba(6, 10, 14, 0.04) 30%),
    repeating-linear-gradient(
      -55deg,
      rgba(255, 255, 255, 0.018) 0,
      rgba(255, 255, 255, 0.018) 12px,
      rgba(0, 0, 0, 0.072) 12px,
      rgba(0, 0, 0, 0.072) 24px
    ),
    linear-gradient(180deg, rgba(18, 26, 33, 0.96) 0%, rgba(15, 22, 29, 0.88) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.02),
    inset 0 -1px 0 rgba(0, 0, 0, 0.16);
  pointer-events: none;
}

.pitch-actions-bar--edit::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 0;
  bottom: -8px;
  left: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.desktop-rail {
  display: none;
}

.desktop-rail__panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: linear-gradient(180deg, #222c36 0%, #1c242d 100%);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.2);
}

.desktop-rail__ad {
  width: 336px;
  padding-top: 8px;
}

.public-plans-ad-stack {
  display: grid;
  gap: 18px;
  align-content: start;
}

.public-plans-ad-stack__item {
  padding-top: 0;
}

.public-plans-ad-stack__item--tall {
  padding-top: 2px;
}

.squadmaker-ad-block {
  width: calc(100% - 24px);
  margin: 20px auto 0;
}

.squadmaker-ad-block--share-comments {
  margin-top: 28px;
  margin-bottom: -6px;
}

.squadmaker-ad-block--latest-public-plans {
  width: 100%;
  margin: 0 0 16px;
}

.squadmaker-ad-slot {
  display: block;
  position: relative;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}

.squadmaker-ad-slot--responsive {
  max-width: 100%;
}

.squadmaker-ad-slot--fixed {
  width: 336px;
  max-width: 336px;
  margin: 0 auto;
}

.squadmaker-ad-slot--tall {
  width: 336px;
  max-width: 336px;
  margin: 0 auto;
}

.squadmaker-ad-slot .adsbygoogle {
  max-width: 100%;
}

.squadmaker-ad-sentinel {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.desktop-rail__ad--responsive {
  display: block;
  width: 100%;
  padding-top: 0;
}

.desktop-rail__ad-slot {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  overflow: hidden;
}

.desktop-rail__panel-title {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(196, 208, 219, 0.74);
}

.desktop-rail__ad-box {
  width: 336px;
  height: 280px;
  background: #e8ecf1;
  color: #536171;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  font-weight: 800;
}

.desktop-rail {
  display: none;
  width: 336px;
}

.desktop-rail__menu {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.desktop-rail__menu-item {
  appearance: none;
  border: 0;
  background: #f4f6f8;
  color: #24303c;
  min-height: 58px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: inherit;
  font-size: 1rem;
  cursor: default;
}

.desktop-rail__panel {
  padding: 12px;
  display: grid;
  gap: 12px;
}

.desktop-rail__roster {
  gap: 6px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.desktop-rail__roster-head,
.desktop-roster-slot {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 30px 42px 34px;
  gap: 8px;
  align-items: center;
}

.desktop-rail__roster-head {
  padding: 0 4px 6px;
  border-bottom: 2px solid rgba(214, 154, 16, 0.88);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(233, 239, 244, 0.82);
}

.desktop-rail__roster-head span:nth-child(n + 3) {
  text-align: center;
}

.desktop-rail__roster-head-fp {
  position: relative;
  width: 20px;
  height: 22px;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 11px;
  line-height: 1;
}

.desktop-rail__roster-head-fp .hexagon-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.desktop-rail__roster-ad {
  padding-top: 18px;
  align-self: start;
  width: 100%;
}

.desktop-rail__roster-head-fp .hexagon-svg path {
  stroke: rgba(255, 255, 255, 0.5);
  fill: rgba(25, 25, 25, 0.32);
}

.desktop-rail__roster-head-fp-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  transform: translateX(0.5px);
}

.desktop-rail__roster-list {
  display: grid;
  gap: 0;
}

.desktop-roster-slot {
  position: relative;
  min-height: 36px;
  padding: 5px 6px 5px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #eef4f8;
  font-size: 0.82rem;
  border-radius: 0;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.desktop-roster-slot > * {
  align-self: center;
}

.desktop-roster-slot--filled {
  background: rgba(255, 255, 255, 0.022);
}

.desktop-roster-slot--filled:hover {
  background: rgba(255, 255, 255, 0.04);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.desktop-roster-slot--empty {
  background: rgba(255, 255, 255, 0.016);
}

.desktop-roster-slot[data-tone="attack"] {
  --desktop-roster-tone: #d84a44;
  --desktop-roster-tone-soft: rgba(216, 74, 68, 0.14);
}

.desktop-roster-slot[data-tone="midfield"] {
  --desktop-roster-tone: #63bf4f;
  --desktop-roster-tone-soft: rgba(99, 191, 79, 0.14);
}

.desktop-roster-slot[data-tone="defense"] {
  --desktop-roster-tone: #3b78d3;
  --desktop-roster-tone-soft: rgba(59, 120, 211, 0.14);
}

.desktop-roster-slot[data-tone="keeper"] {
  --desktop-roster-tone: #c8a54a;
  --desktop-roster-tone-soft: rgba(200, 165, 74, 0.14);
}

.desktop-roster-slot__pos-wrap {
  position: relative;
  width: 34px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
}

.desktop-roster-slot__pos::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 4px;
  border-radius: 1px;
  background: var(--desktop-roster-tone, rgba(255, 255, 255, 0.2));
  box-shadow: 0 0 8px var(--desktop-roster-tone-soft, transparent);
}

.desktop-roster-slot__pos {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 24px;
  font-weight: 800;
  color: #f7fbff;
  padding-left: 7px;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.92rem;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  transition:
    opacity 0.16s ease,
    visibility 0.16s ease;
}

.desktop-roster-slot__name-line {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 22px;
}

.desktop-roster-slot__name-line--empty {
  justify-content: flex-start;
}

.desktop-roster-slot__badge {
  width: 19px;
  height: 15px;
  display: block;
  flex: 0 0 19px;
  align-self: center;
}

.desktop-roster-slot__name {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #dce7ef;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
}

.desktop-roster-slot__name-link {
  color: inherit;
  text-decoration: none;
  outline: none;
  transition: color 0.18s ease;
}

.desktop-roster-slot__name-link:hover,
.desktop-roster-slot__name-link:focus-visible {
  color: #a3ea03;
}

.desktop-roster-slot--filled:hover .desktop-roster-slot__name {
  color: #eef3f8;
}

.desktop-roster-slot--filled:hover .desktop-roster-slot__name-link:hover,
.desktop-roster-slot--filled:focus-within
  .desktop-roster-slot__name-link:focus-visible {
  color: #a3ea03;
}

.desktop-roster-slot__fp,
.desktop-roster-slot__ovr,
.desktop-roster-slot__grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 800;
  line-height: 1;
}

.desktop-roster-slot__ovr {
  color: #fff;
  font-size: 1rem;
  letter-spacing: -0.03em;
  font-weight: 900;
  min-height: 22px;
}

.desktop-roster-slot__grade {
  color: rgba(233, 240, 246, 0.92);
  justify-self: center;
  min-height: 22px;
}

.desktop-roster-slot__grade--empty {
  opacity: 0.45;
}

.desktop-roster-slot__fp {
  position: relative;
  width: 20px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  color: #fff;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 11px;
  line-height: 1;
}

.desktop-roster-slot__fp .hexagon-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.desktop-roster-slot__fp .hexagon-svg path {
  stroke: rgba(255, 255, 255, 0.5);
  fill: rgba(25, 25, 25, 0.32);
}

.desktop-roster-slot__fp .pay-number {
  position: relative;
  z-index: 1;
}

.desktop-roster-slot__add {
  appearance: none;
  width: 26px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  background: linear-gradient(
    135deg,
    rgba(72, 82, 92, 0.92),
    rgba(52, 60, 69, 0.92)
  );
  color: #f4f8fb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    transform 0.18s ease,
    filter 0.18s ease,
    box-shadow 0.18s ease;
}

.desktop-roster-slot__add:hover,
.desktop-roster-slot__add:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 4px 10px rgba(0, 0, 0, 0.18);
}

.desktop-roster-slot__add-icon {
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1;
}

.desktop-roster-slot__add:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.desktop-roster-slot__grade-sprite {
  width: 22px;
  height: 14px;
  display: inline-block;
  overflow: hidden;
  background-repeat: no-repeat;
  background-image: url("../images/enchant.png");
  background-size: 752.941% 1219.048%;
  border-radius: 1px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.32);
}

.desktop-roster-slot__grade-trigger {
  appearance: none;
  width: 22px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  align-items: center;
  justify-content: center;
  transform: translateY(2px);
  cursor: pointer;
  transition: filter 0.16s ease;
}

.desktop-roster-slot__grade-trigger:hover,
.desktop-roster-slot__grade-trigger:focus-visible {
  filter: brightness(1.08);
}

.desktop-roster-slot__grade-trigger:disabled {
  cursor: default;
  opacity: 0.5;
  filter: none;
}

.share-view-mode .desktop-roster-slot__grade-trigger:disabled {
  opacity: 1;
}

.desktop-roster-slot__remove {
  position: absolute;
  inset: 0 auto 0 0;
  width: 28px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  border: 0;
  background: rgba(168, 51, 45, 0.88);
  color: #fff6f4;
  border-radius: 4px;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 2px 5px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.16s ease,
    visibility 0.16s ease,
    filter 0.16s ease,
    background 0.16s ease;
}

.desktop-roster-slot__remove:hover,
.desktop-roster-slot__remove:focus-visible {
  filter: brightness(1.08);
  background: rgba(184, 61, 54, 0.92);
}

.desktop-roster-slot__remove:disabled {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.desktop-roster-slot__remove-icon {
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-0.5px);
}

.desktop-roster-slot--filled:hover .desktop-roster-slot__pos,
.desktop-roster-slot--filled:focus-within .desktop-roster-slot__pos {
  opacity: 0;
  visibility: hidden;
}

.desktop-roster-slot--filled:hover .desktop-roster-slot__remove,
.desktop-roster-slot--filled:focus-within .desktop-roster-slot__remove {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.share-view-mode .desktop-roster-slot--filled:hover .desktop-roster-slot__pos,
.share-view-mode
  .desktop-roster-slot--filled:focus-within
  .desktop-roster-slot__pos {
  opacity: 1;
  visibility: visible;
}

.desktop-roster-grade-popup {
  position: fixed;
  z-index: 1150;
  width: 214px;
  padding: 6px 10px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, #27303d 0%, #202733 100%);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.42);
}

.desktop-roster-grade-popup[hidden] {
  display: none;
}

.desktop-roster-grade-popup::after {
  content: "";
  position: absolute;
  left: var(--desktop-roster-grade-popup-arrow-left, 50%);
  width: 18px;
  height: 18px;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.desktop-roster-grade-popup[data-arrow="top"]::after {
  bottom: -9px;
}

.desktop-roster-grade-popup[data-arrow="bottom"]::after {
  top: -9px;
  transform: translateX(-50%) rotate(225deg);
}

.desktop-roster-grade-popup__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  color: rgba(233, 239, 244, 0.86);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

.desktop-roster-grade-popup__close {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(233, 239, 244, 0.62);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  margin-top: 0;
}

.desktop-roster-grade-popup__picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.desktop-roster-grade-popup__picker .player-edit-grade-option {
  aspect-ratio: 34 / 23;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1rem;
  opacity: 1;
  filter: none;
}

.desktop-rail__roster-empty {
  padding: 10px 12px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.02);
  color: rgba(208, 218, 228, 0.74);
  text-align: center;
  font-size: 0.82rem;
}

@media (min-width: 1280px) {
  .hdr-inner {
    max-width: var(--desktop-shell-width);
  }

  .desktop-layout {
    max-width: var(--desktop-shell-width);
    display: grid;
    grid-template-columns:
      minmax(0, var(--desktop-main-width))
      var(--desktop-rail-width);
    gap: var(--desktop-shell-gap);
    align-items: stretch;
  }

  .container {
    max-width: none;
    margin: 0;
  }

  .desktop-rail {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 16px;
    align-self: stretch;
    height: 100%;
  }

  .desktop-rail__roster {
    min-height: 0;
    height: auto;
    align-self: start;
    align-content: start;
    grid-template-rows: auto auto auto;
  }

  .desktop-rail__roster-list {
    min-height: 0;
    align-content: start;
  }
}

@media (max-width: 1279px) {
  .desktop-rail {
    display: none;
  }
}

@media (min-width: 1280px) {
  .public-plans-inline-ad__slot--sm,
  .public-plans-inline-ad__slot--md {
    display: none;
  }

  .public-plans-inline-ad__slot--lg {
    display: grid;
  }
}

.pitch-actions-bar__primary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pitch-actions-bar__secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  justify-content: flex-end;
}

.squad-meta-card {
  position: relative;
  display: grid;
  gap: 14px;
  margin: 14px auto 4px;
  padding: 0;
  width: calc(100% - 24px);
  background: transparent;
  justify-items: start;
  text-align: left;
}

.squad-meta-card[hidden] {
  display: none;
}

.share-comments-section {
  width: calc(100% - 24px);
  margin: 28px auto 24px;
  text-align: left;
}

.share-comments-section .fco-comments {
  width: 100%;
  text-align: left;
}

.share-comments-section .fco-comment-widget,
.share-comments-section .fco-comment-widget * {
  text-align: left;
}

.squad-meta-card__heading {
  color: #f7f8fa;
  font-size: clamp(1.12rem, 1.7vw, 1.5rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.squad-meta-card__heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  flex-wrap: wrap;
}

.squad-meta-card__heading {
  flex: 1 1 240px;
  min-width: 0;
}

.squad-meta-card__edit-link {
  flex: 0 0 auto;
  text-decoration: none;
  border-color: rgba(118, 196, 255, 0.32);
  background: linear-gradient(
    135deg,
    rgba(53, 149, 232, 0.96),
    rgba(24, 90, 176, 0.96)
  );
  color: #f4fbff;
  box-shadow: 0 8px 18px rgba(18, 65, 122, 0.3);
}

.squad-meta-card__edit-link:hover,
.squad-meta-card__edit-link:focus-visible {
  box-shadow: 0 10px 22px rgba(18, 65, 122, 0.36);
}

.squad-meta-card__channel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
}

.squad-meta-card__channel {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.squad-meta-card__avatar-link,
.squad-meta-card__creator-link {
  color: inherit;
  text-decoration: none;
}

.squad-meta-card__avatar-link {
  flex: 0 0 auto;
  display: block;
  border-radius: 50%;
}

.squad-meta-card__creator-link {
  display: inline-block;
}

.squad-meta-card__avatar-link:focus-visible,
.squad-meta-card__creator-link:focus-visible {
  outline: 2px solid rgba(218, 251, 89, 0.88);
  outline-offset: 3px;
}

.squad-meta-card__avatar {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.08rem;
  font-weight: 800;
  color: #fff7ef;
  background:
    radial-gradient(
      circle at 30% 30%,
      rgba(255, 255, 255, 0.28),
      transparent 42%
    ),
    linear-gradient(135deg, rgba(255, 173, 94, 0.98), rgba(255, 117, 90, 0.96));
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.squad-meta-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.squad-meta-card__content {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.squad-meta-card__creator {
  color: #f6f7f8;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
}

.squad-meta-card__title {
  color: rgba(213, 219, 226, 0.76);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
}

.squad-meta-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.squad-meta-card__action {
  appearance: none;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.07);
  color: #f1f3f5;
  font: inherit;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.squad-meta-card__action--icon-only {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  height: 40px;
  padding: 0;
  border-radius: 8px;
  gap: 0;
  display: inline-grid;
  place-items: center;
}

.squad-meta-card__action--icon-only svg {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
}

.squad-meta-card__action--open-share.squad-library-item__share-link {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  height: 40px;
  padding: 0;
  border-radius: 8px;
  line-height: 0;
}

.squad-meta-card__action--open-share.squad-library-item__share-link svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  display: block;
}

.squad-meta-card__action:hover,
.squad-meta-card__action:focus-visible {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.squad-meta-card__action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.squad-meta-card__action.is-liked {
  border-color: rgba(110, 231, 183, 0.6);
  background: linear-gradient(
    180deg,
    rgba(22, 101, 52, 0.9) 0%,
    rgba(21, 128, 61, 0.84) 100%
  );
  color: #ecfdf5;
  box-shadow: 0 10px 22px rgba(22, 101, 52, 0.24);
}

.squad-meta-card__action.is-liked svg {
  color: #86efac;
}

.squad-meta-card__action svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.squad-meta-card__details {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
}

.squad-meta-card--inline-edit .squad-meta-card__details {
  gap: 12px;
}

.squad-meta-card__stats {
  color: rgba(232, 236, 241, 0.76);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.4;
}

.squad-meta-card__inline-editor {
  display: grid;
  gap: 10px;
}

.squad-meta-card__inline-editor[hidden] {
  display: none;
}

.squad-meta-card__inline-visibility {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.squad-meta-card__inline-visibility--warning {
  border-color: rgba(255, 150, 122, 0.96);
  background: rgba(255, 120, 92, 0.16);
  box-shadow:
    0 0 0 2px rgba(255, 132, 99, 0.2),
    0 12px 26px rgba(120, 28, 9, 0.2);
  animation: inlineListedVisibilityWarning 0.95s ease-out;
}

@keyframes inlineListedVisibilityWarning {
  0% {
    transform: scale(1);
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 0 0 rgba(255, 132, 99, 0);
  }

  18% {
    transform: scale(1.015);
    border-color: rgba(255, 166, 120, 1);
    background: rgba(255, 132, 99, 0.22);
    box-shadow: 0 0 0 7px rgba(255, 132, 99, 0.2);
  }

  54% {
    transform: scale(0.998);
    border-color: rgba(255, 150, 122, 0.96);
    background: rgba(255, 120, 92, 0.16);
    box-shadow: 0 0 0 3px rgba(255, 132, 99, 0.14);
  }

  100% {
    transform: scale(1);
    border-color: rgba(255, 150, 122, 0.96);
    background: rgba(255, 120, 92, 0.16);
    box-shadow:
      0 0 0 2px rgba(255, 132, 99, 0.2),
      0 12px 26px rgba(120, 28, 9, 0.2);
  }
}

.squad-meta-card__inline-status {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(226, 235, 239, 0.82);
  font-size: 0.88rem;
  line-height: 1.45;
}

.squad-meta-card__inline-status[hidden] {
  display: none;
}

.squad-meta-card__inline-status[data-tone="error"] {
  background: rgba(173, 46, 34, 0.18);
  color: #ffd8d0;
}

.squad-meta-card__inline-title-input,
.squad-meta-card__inline-description-input {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(7, 12, 16, 0.78);
  color: #fff;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    sans-serif;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.squad-meta-card__inline-title-input::placeholder,
.squad-meta-card__inline-description-input::placeholder {
  color: rgba(210, 220, 229, 0.44);
}

.squad-meta-card__inline-title-input:focus,
.squad-meta-card__inline-description-input:focus {
  outline: none;
  border-color: rgba(180, 255, 0, 0.52);
  background: rgba(5, 10, 14, 0.9);
  box-shadow: 0 0 0 3px rgba(180, 255, 0, 0.12);
}

.squad-meta-card__inline-title-input {
  min-height: 44px;
  padding: 0 12px;
  font-size: 1.02rem;
  font-weight: 700;
}

.squad-meta-card__inline-description-input {
  min-height: 104px;
  padding: 10px 12px;
  font-size: 0.94rem;
  line-height: 1.5;
  overflow-y: hidden;
  resize: none;
}

.squad-meta-card__description {
  border-radius: 8px;
  color: rgba(239, 243, 248, 0.92);
  font-size: 0.92rem;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    sans-serif;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.squad-meta-card__description--collapsed {
  max-height: calc(1em * 1.6 * 8);
  overflow: hidden;
}

.squad-meta-card__description-toggle {
  align-self: flex-start;
  margin-top: 10px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #d9f85f;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.squad-meta-card__description-toggle:hover,
.squad-meta-card__description-toggle:focus-visible {
  color: #efffb0;
  text-decoration: underline;
}

.pitch {
  position: relative;
  width: 100%;
  /* Use the specified pitch image */
  background: url("../images/MatchLoadingPitch.png") no-repeat center center;
  background-size: 100% 100%;
  /* Keep proportions similar to original */
  aspect-ratio: 16 / 12;
}

.pitch--read-only {
  filter: saturate(0.92);
}

.share-view-mode .player-card {
  touch-action: pan-y;
  cursor: default;
}

.share-view-mode .card-player-surface {
  cursor: default;
}

.share-view-mode .card-edit-btn {
  display: flex !important;
}

.share-view-mode .card-edit-btn--share-link {
  text-decoration: none;
}

.share-view-mode #saveSquadButton {
  display: none !important;
}

.share-view-mode #squadListButton {
  display: none !important;
}

.share-view-mode #clearSquadBtn {
  display: none !important;
}

.share-view-mode .squad-level-toggle__slider {
  display: none !important;
}

.share-view-mode #shareCreateOwnTeamButton {
  display: inline-flex;
}

#shareCreateOwnTeamButton[hidden] {
  display: none !important;
}

@media (max-width: 450px) {
  #shareCreateOwnTeamButton span {
    display: none !important;
  }

  .pitch-actions-bar--edit #newSquadButton span {
    display: none !important;
  }
}

/* Zone Boundary Highlight */
.zone-highlight {
  position: absolute;
  left: 2%;
  width: 96%;
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition:
    top 0.1s ease-out,
    height 0.1s ease-out,
    opacity 0.2s;
  border-radius: 4px;
}

/* Highlight effect on the pitch during drag */
.pitch-highlight {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 14%;
  height: 60px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 255, 100, 0.6) 0%,
    rgba(0, 255, 100, 0) 70%
  );
  border-radius: 50%;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-weight: bold;
  font-size: 16px;
  text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.8);
  transition: opacity 0.2s;
  padding-bottom: 25px; /* Offset text upwards */
}

/* ─── Player Card ─── */
.player-card {
  position: absolute;
  width: 11%;
  aspect-ratio: 20 / 21;
  background: linear-gradient(135deg, #21262d 0%, #30363d 100%);
  border-radius: 10px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: grab;
  transform: translate(-50%, -50%);
  user-select: none;
  touch-action: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 10;
  opacity: 1;
  visibility: visible;
  transition: box-shadow 0.2s, opacity 0.22s ease, transform 0.24s ease;
}

.pitch[data-pitch-ready="false"] .player-card {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -50%) translateY(8px);
}

.pitch[data-pitch-ready="true"] .player-card {
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%) translateY(0);
}

/* ล็อก GK ไม่ให้มี cursor ลาก */
.player-card[data-role="GK"] {
  cursor: default !important;
}

.player-card:hover {
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* While dragging */
.player-card.dragging {
  cursor: grabbing;
  opacity: 0.9;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7);
  transform: translate(-50%, -50%) scale(1.15);
  will-change: left, top, transform;
  z-index: 50;
}

.player-card--spotlight {
  --player-spotlight-drop: 14px;
  --player-spotlight-bounce-1: -8px;
  --player-spotlight-bounce-2: -3px;
  --player-spotlight-scale: 1.016;
  animation: playerSpotlightDoubleBounce 760ms cubic-bezier(0.18, 0.88, 0.24, 1);
  will-change: transform, filter;
}

.player-card--spotlight::before {
  content: "";
  position: absolute;
  inset: -3% 6% 16%;
  border-radius: 18px;
  background: radial-gradient(
    circle at 50% 38%,
    rgba(255, 251, 214, 0.22) 0%,
    rgba(204, 255, 164, 0.12) 42%,
    rgba(204, 255, 164, 0) 72%
  );
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  animation: playerSpotlightRim 560ms ease-out;
  z-index: 4;
}

.player-card--spotlight::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2%;
  width: 88%;
  height: 24%;
  border-radius: 999px;
  background: radial-gradient(
    ellipse at center,
    rgba(19, 26, 33, 0.42) 0%,
    rgba(19, 26, 33, 0.24) 48%,
    rgba(19, 26, 33, 0) 78%
  );
  transform: translateX(-50%) scale(1.08);
  transform-origin: center;
  opacity: 0.22;
  pointer-events: none;
  filter: blur(7px);
  animation: playerSpotlightShadow 760ms cubic-bezier(0.18, 0.88, 0.24, 1);
  z-index: 0;
}

@keyframes playerSpotlightDoubleBounce {
  0% {
    transform: translate(-50%, -50%) translateY(var(--player-spotlight-drop))
      scale(0.992);
    filter: brightness(0.98);
  }
  32% {
    transform: translate(-50%, -50%)
      translateY(var(--player-spotlight-bounce-1))
      scale(var(--player-spotlight-scale));
    filter: brightness(1.035);
  }
  54% {
    transform: translate(-50%, -50%) translateY(2px) scale(0.998);
    filter: brightness(1.012);
  }
  70% {
    transform: translate(-50%, -50%)
      translateY(var(--player-spotlight-bounce-2)) scale(1.006);
    filter: brightness(1.018);
  }
  86% {
    transform: translate(-50%, -50%) translateY(1px) scale(0.999);
    filter: brightness(1.006);
  }
  100% {
    transform: translate(-50%, -50%) translateY(0) scale(1);
    filter: brightness(1);
  }
}

@keyframes playerSpotlightRim {
  0% {
    opacity: 0;
  }
  32% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes playerSpotlightShadow {
  0% {
    opacity: 0.34;
    transform: translateX(-50%) scale(1.16);
  }
  32% {
    opacity: 0.2;
    transform: translateX(-50%) scale(0.72);
  }
  54% {
    opacity: 0.28;
    transform: translateX(-50%) scale(1.02);
  }
  70% {
    opacity: 0.22;
    transform: translateX(-50%) scale(0.84);
  }
  100% {
    opacity: 0.24;
    transform: translateX(-50%) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .player-card--spotlight,
  .player-card--spotlight::before,
  .player-card--spotlight::after {
    animation: none !important;
  }

  .player-card--spotlight {
    filter: brightness(1.06);
  }

  .player-card--spotlight::after {
    opacity: 0.85;
    transform: translateX(-50%) scale(0.94);
  }
}

.card-role {
  font-size: clamp(7px, 1.3vw, 11px);
  font-weight: 800;
  color: #fff;
  margin-top: 10%;
  background: rgba(0, 0, 0, 0.3);
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
}

.card-icon {
  width: 36%;
  aspect-ratio: 1;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: clamp(12px, 1.8vw, 20px);
  font-weight: bold;
  margin-top: auto;
  margin-bottom: 18%;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition:
    transform 0.2s,
    background 0.2s;
  z-index: 25;
}

.card-icon:hover {
  background: rgba(248, 81, 73, 0.2);
  transform: scale(1.15);
}

.card-edit-btn {
  position: absolute;
  top: 4%;
  left: 0%;
  width: 21%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: linear-gradient(
    180deg,
    rgba(44, 48, 56, 0.98) 0%,
    rgba(22, 24, 30, 0.98) 100%
  );
  color: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  opacity: 0;
  transform: translateY(-4px) scale(0.92);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
  z-index: 28;
  cursor: pointer;
}

.card-edit-btn svg {
  width: 52%;
  height: 52%;
  pointer-events: none;
}

.player-card.has-player:hover .card-edit-btn,
.player-card.has-player:focus-within .card-edit-btn,
.player-card.has-player.touch-actions-open .card-edit-btn,
.player-card.has-player.dragging .card-edit-btn {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.player-card.has-player.touch-actions-open .card-edit-btn {
  background: linear-gradient(
    180deg,
    rgba(70, 77, 90, 0.98) 0%,
    rgba(28, 32, 40, 0.98) 100%
  );
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.46),
    0 0 0 2px rgba(255, 255, 255, 0.08);
}

.card-edit-btn:hover {
  background: linear-gradient(
    180deg,
    rgba(255, 214, 107, 0.92) 0%,
    rgba(219, 146, 35, 1) 100%
  );
  border-color: rgba(255, 227, 140, 0.65);
  color: #181004;
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.48),
    0 0 0 2px rgba(255, 225, 124, 0.34),
    0 0 24px rgba(255, 214, 107, 0.28);
}

.card-edit-btn:active {
  transform: translateY(0) scale(1);
  background: linear-gradient(
    180deg,
    rgba(255, 226, 130, 0.98) 0%,
    rgba(232, 151, 30, 1) 100%
  );
}

.squad-share-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: var(--modal-backdrop-bg);
  backdrop-filter: blur(var(--modal-backdrop-blur));
  -webkit-backdrop-filter: blur(var(--modal-backdrop-blur));
  z-index: 1215;
}

.squad-share-overlay.active {
  display: flex;
}

.squad-share-modal {
  width: min(100%, 560px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, #27303d 0%, #202733 100%);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.44);
  overflow: hidden;
}

.squad-share-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 14px;
}

.squad-share-header__copy {
  min-width: 0;
}

.squad-share-title {
  margin: 0;
  font-family: "Barlow Condensed", "Noto Sans Thai", sans-serif;
  font-size: 1.34rem;
  font-weight: 700;
  color: #f4f8fb;
  line-height: 1.05;
}

.squad-share-status {
  margin: 8px 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(223, 232, 238, 0.82);
}

.squad-share-close {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(240, 246, 249, 0.9);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.squad-share-section {
  padding: 0 18px 18px;
}

.squad-share-section__label {
  margin-bottom: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(222, 232, 238, 0.78);
}

.squad-share-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 0 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.squad-share-rail::-webkit-scrollbar {
  height: 6px;
}

.squad-share-rail::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.squad-share-rail::-webkit-scrollbar-track {
  background: transparent;
}

.squad-share-action {
  appearance: none;
  min-width: 82px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #edf4f8;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.squad-share-action__icon {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #fff;
  font-size: 1.18rem;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.squad-share-action__icon svg {
  width: 32px;
  height: 32px;
  display: block;
  flex: 0 0 32px;
}

.squad-share-action__icon--facebook {
  background: #1877f2;
}

.squad-share-action__icon--x {
  background: #050607;
}

.squad-share-action__icon--line {
  background: #06c755;
}

.squad-share-action__icon--zalo {
  background: linear-gradient(180deg, #1b83ff 0%, #0b65de 100%);
}

.squad-share-action__icon--reddit {
  background: #ff4500;
}

.squad-share-action__label {
  font-size: 0.83rem;
  font-weight: 600;
  color: rgba(236, 243, 247, 0.92);
  white-space: nowrap;
}

.squad-share-action__word {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  line-height: 1;
  white-space: nowrap;
}

.squad-share-action__word--line {
  font-family: "Inter", "Noto Sans Thai", sans-serif;
  font-size: 0.94rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.squad-share-action__word--zalo {
  font-family: "Inter", "Noto Sans Thai", sans-serif;
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: -0.055em;
  transform: translateY(1px);
}

.squad-share-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 0 18px 18px;
}

.squad-share-url-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(11, 16, 22, 0.56);
  color: #f4f8fb;
  font-size: 0.9rem;
}

.squad-share-copy-btn {
  appearance: none;
  min-width: 88px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #f7fbff;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.squad-share-copy-btn.is-copied {
  border-color: rgba(98, 214, 143, 0.42);
  background: linear-gradient(
    180deg,
    rgba(49, 140, 80, 0.94),
    rgba(33, 98, 57, 0.98)
  );
  color: #f8fff9;
}

/* ─── Player Card WITH Player ─── */
.player-card.has-player {
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
  container-type: inline-size;
}
.player-card.has-player.fc-card {
  position: absolute;
}
.player-card.has-player:hover {
  box-shadow: none;
}
.player-card.has-player.dragging {
  box-shadow: none;
}

.cards-visible .player-card.has-player {
  width: 13%;
  aspect-ratio: 184 / 268;
}

.cards-hidden .player-card.has-player {
  width: 13%;
  aspect-ratio: 1 / 1.18;
}

.cards-hidden .player-card--spotlight {
  --player-spotlight-drop: 10px;
  --player-spotlight-bounce-1: -6px;
  --player-spotlight-bounce-2: -2px;
  --player-spotlight-scale: 1.012;
}

.cards-hidden .player-card--spotlight::after {
  bottom: 13%;
  width: 66%;
  height: 16%;
}

.card-bg-img,
.fc-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 0;
}

.card-player-media,
.fc-player-media {
  position: absolute;
  width: 80%;
  top: 21.5%;
  right: 2%;
  pointer-events: none;
  z-index: 1;
}

.card-player-img,
.fc-player {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.card-player-surface {
  position: absolute;
  inset: 0;
  z-index: 2;
  user-select: none;
  cursor: grab;
}

.cards-visible .card-player-media,
.cards-visible .fc-player-media {
  width: 80%;
  top: 16%;
  right: 4%;
  left: auto;
  transform: none;
  object-fit: contain;
  filter: none;
}

.cards-hidden .card-bg-img,
.cards-hidden .fc-bg {
  display: none;
}

.cards-hidden .card-player-media,
.cards-hidden .fc-player-media {
  width: 80%;
  top: 6%;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
}

.card-ovr,
.fc-ovr {
  position: absolute;
  top: 20%;
  left: 2%;
  width: 28.5%;
  text-align: center;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 16cqi;
  font-weight: 500;
  color: #fff3ca;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  z-index: 2;
  line-height: 1;
}

.cards-visible .card-ovr,
.cards-visible .fc-ovr {
  top: 20%;
  left: 4%;
  color: var(--card-side-color, #fff3ca);
  text-shadow: var(--card-side-shadow, 0 1px 3px rgba(0, 0, 0, 0.9));
}

.cards-hidden .card-ovr,
.cards-hidden .fc-ovr {
  top: 33%;
  left: 1%;
  width: auto;
  text-align: left;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 19cqi;
  font-weight: 500;
  text-shadow:
    0 1px 1px rgba(0, 0, 0, 0.95),
    0 2px 5px rgba(0, 0, 0, 0.75);
}

.card-pos-label,
.fc-pos {
  position: absolute;
  top: 33%;
  left: 2%;
  width: 28.5%;
  text-align: center;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 11cqi;
  font-weight: 500;
  color: #fff3ca;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  z-index: 2;
  line-height: 1;
  padding: 0;
  background: none;
}

.cards-visible .card-pos-label,
.cards-visible .fc-pos {
  top: 33%;
  left: 4%;
  color: var(--card-side-color, #fff3ca);
  text-shadow: var(--card-side-shadow, 0 1px 2px rgba(0, 0, 0, 0.8));
}

.cards-hidden .card-pos-label,
.cards-hidden .fc-pos {
  top: 51%;
  left: 2%;
  width: auto;
  text-align: left;
  color: #fff;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 12cqi;
  font-weight: 500;
  text-shadow:
    0 1px 1px rgba(0, 0, 0, 0.95),
    0 2px 5px rgba(0, 0, 0, 0.7);
}

.fc-salary {
  position: absolute;
  top: 45%;
  left: 9%;
  width: 18%;
  aspect-ratio: 32 / 36;
  z-index: 3;
  display: grid;
  place-items: center;
  color: #fff3ca;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 11cqi;
  font-weight: 500;
  line-height: 1px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95);
}

.cards-visible .fc-salary {
  color: var(--card-side-color, #fff3ca);
  text-shadow: var(--card-side-shadow, 0 1px 2px rgba(0, 0, 0, 0.95));
}

.fc-salary .hexagon-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.fc-salary .hexagon-svg path {
  stroke: var(--card-side-color, rgba(255, 255, 255, 0.96));
  fill: var(--card-side-badge-fill, rgba(17, 17, 17, 0.5));
}

.fc-salary .pay-number {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  text-shadow: none;
}

.fc-grade {
  position: absolute;
  bottom: 29%;
  left: 8%;
  width: 22%;
  height: auto;
  aspect-ratio: 34 / 21;
  z-index: 3;
  display: inline-block;
  overflow: hidden;
  border-radius: 1px;
  background-repeat: no-repeat;
  background-image: url("../images/enchant.png");
  background-size: 752.941% 1219.048%;
  font-size: 0;
  line-height: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.enchant_0,
.enchant_1,
.enchant_10,
.enchant_11,
.enchant_12,
.enchant_13,
.enchant_2,
.enchant_3,
.enchant_4,
.enchant_5,
.enchant_6,
.enchant_7,
.enchant_8,
.enchant_9 {
  display: inline-block;
  overflow: hidden;
  background-repeat: no-repeat;
  background-image: url("../images/enchant.png");
  background-size: 752.941% 1219.048%;
}

.enchant_0 {
  background-position: 0% 0%;
}
.enchant_1 {
  background-position: 15.3153% 0%;
}
.enchant_10 {
  background-position: 30.6306% 0%;
}
.enchant_11 {
  background-position: 45.9459% 0%;
}
.enchant_12 {
  background-position: 61.2613% 0%;
}
.enchant_13 {
  background-position: 76.5766% 0%;
}
.enchant_2 {
  background-position: 91.8919% 0%;
}
.enchant_3 {
  background-position: 0% 8.93617%;
}
.enchant_4 {
  background-position: 15.3153% 8.93617%;
}
.enchant_5 {
  background-position: 30.6306% 8.93617%;
}
.enchant_6 {
  background-position: 45.9459% 8.93617%;
}
.enchant_7 {
  background-position: 61.2613% 8.93617%;
}
.enchant_8 {
  background-position: 76.5766% 8.93617%;
}
.enchant_9 {
  background-position: 91.8919% 8.93617%;
}

.card-player-name,
.fc-name-area {
  position: absolute;
  bottom: 10%;
  left: 0;
  width: 100%;
  transform: none;
  z-index: 2;
  text-align: center;
}

.cards-visible .card-player-name,
.cards-visible .fc-name-area {
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  max-width: none;
}

.cards-hidden .card-player-name,
.cards-hidden .fc-name-area {
  bottom: 10%;
  left: 50%;
  width: 150%;
  transform: translateX(-50%);
  max-width: 150%;
}

.fc-name {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  max-width: calc(100% - 10px);
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: clip;
  gap: 1.5cqi;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 10cqi;
  font-weight: 500;
  color: #fff3ca;
  letter-spacing: 0.3cqi;
  box-sizing: border-box;
}

.cards-visible .fc-name {
  display: inline-flex;
  max-width: 100%;
  margin-inline: auto;
  padding-inline: 1px;
  justify-content: center;
  color: var(--card-name-color, #fff3ca);
  text-shadow: var(--card-name-shadow, 0 1px 2px rgba(0, 0, 0, 0.9));
}

.cards-hidden .fc-name {
  justify-content: center;
  max-width: 100%;
  font-size: 12cqi;
  gap: 1.2cqi;
  font-weight: 500;
  text-transform: none;
  padding-inline-end: 1.6cqi;
}

.card-player-name .badged,
.fc-name .badged {
  display: inline-block;
  flex-shrink: 0;
  width: 15cqi;
  height: 12cqi;
}
.card-player-name span,
.fc-name span {
  color: #fff3ca;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  text-overflow: ellipsis;
}

.cards-visible .fc-name span {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  text-align: center;
  text-overflow: clip;
  color: var(--card-name-color, #fff3ca);
  text-shadow: var(--card-name-shadow, 0 1px 2px rgba(0, 0, 0, 0.9));
}

.cards-hidden .card-player-name span,
.cards-hidden .fc-name span {
  color: #fff;
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.95);
  overflow: visible;
}

.cards-hidden .card-player-name .badged,
.cards-hidden .fc-name .badged {
  width: 15cqi;
  height: 12cqi;
}

.cards-hidden .fc-salary {
  top: 33%;
  left: auto;
  right: 2%;
  bottom: auto;
  width: clamp(16px, 18%, 24px);
  color: #fff;
  font-size: clamp(8px, 12cqi, 12px);
}

.cards-hidden .fc-grade {
  top: 53%;
  left: auto;
  right: 0%;
  bottom: auto;
}

.card-flags,
.fc-flags {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2%;
  z-index: 2;
  transform: translateY(-2cqi);
}

.card-flag,
.fc-flags img {
  width: 10%;
  height: 5%;
  aspect-ratio: 1;
  object-fit: cover;
  pointer-events: none;
}

.card-flag--nation,
.fc-flags img:first-child {
  aspect-ratio: 2 / 1;
  object-fit: contain;
}

.cards-hidden .card-flags,
.cards-hidden .fc-flags {
  display: none;
}

.cards-hidden .card-flag,
.cards-hidden .fc-flags img {
  display: none;
}

.cards-hidden .card-flag--nation,
.cards-hidden .fc-flags img:first-child {
  display: none;
}

.cards-hidden .player-card.has-player.dragging {
  box-shadow: none;
}

.cards-hidden .player-card.dragging {
  transform: translate(-50%, -50%) scale(1.03);
}

/* ─── Player Edit Modal ─── */
.player-edit-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--modal-backdrop-bg);
  backdrop-filter: blur(var(--modal-backdrop-blur));
  -webkit-backdrop-filter: blur(var(--modal-backdrop-blur));
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.24s ease,
    visibility 0.24s ease;
}

.player-edit-overlay.active {
  opacity: 1;
  visibility: visible;
}

.player-edit-modal {
  width: min(100%, 420px);
  max-height: min(92vh, calc(100dvh - 32px));
  overflow: auto;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(
      circle at top left,
      rgba(255, 202, 76, 0.18),
      transparent 34%
    ),
    linear-gradient(180deg, #171c23 0%, #101319 100%);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.player-edit-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 14px;
}

.player-edit-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.player-edit-face-wrap {
  width: 84px;
  height: 84px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background:
    radial-gradient(
      circle at 50% 20%,
      rgba(255, 255, 255, 0.18),
      transparent 45%
    ),
    linear-gradient(180deg, #2e3744 0%, #171c24 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.player-edit-face {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.player-edit-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.player-edit-role-line,
.player-edit-ovr-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-edit-role {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ff6e77;
}

.player-edit-grade {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 25px;
  aspect-ratio: 34 / 21;
  display: inline-block;
  overflow: hidden;
  background-repeat: no-repeat;
  background-image: url("../images/enchant.png");
  background-size: 752.941% 1219.048%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.38);
  font-size: 0;
  line-height: 0;
}

.player-edit-name-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.player-edit-badge {
  width: 22px;
  height: 18px;
  flex-shrink: 0;
}

.player-edit-name {
  min-width: 0;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  color: #f6f9ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-edit-name-link {
  color: inherit;
  text-decoration: none;
  outline: none;
  transition: color 0.18s ease;
}

.player-edit-name-link:hover,
.player-edit-name-link:focus-visible {
  color: #a3ea03;
}

.player-edit-pos-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  min-height: 20px;
}

.player-edit-pos-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.player-edit-pos-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
}

.player-edit-pos-value {
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.fo4poscolortext.fw,
.fo4poscolortext.ss,
.fo4poscolortext.cf,
.fo4poscolortext.rf,
.fo4poscolortext.lf,
.fo4poscolortext.lw,
.fo4poscolortext.rw,
.fo4poscolortext.st,
.fo4poscolortext.ls,
.fo4poscolortext.rs {
  color: #af1616;
}

.fo4poscolortext.mf,
.fo4poscolortext.cam,
.fo4poscolortext.rm,
.fo4poscolortext.lm,
.fo4poscolortext.cdm,
.fo4poscolortext.rdm,
.fo4poscolortext.ldm,
.fo4poscolortext.cm,
.fo4poscolortext.rcm,
.fo4poscolortext.lcm {
  color: #41a01c;
}

.fo4poscolortext.df,
.fo4poscolortext.cb,
.fo4poscolortext.rcb,
.fo4poscolortext.lcb,
.fo4poscolortext.sw,
.fo4poscolortext.rb,
.fo4poscolortext.lb,
.fo4poscolortext.rwb,
.fo4poscolortext.lwb {
  color: #1e4ca8;
}

.fo4poscolortext.gk {
  color: #cda20b;
}

.player-edit-pos-item .player-edit-pos-value {
  color: #fff;
}

.fo4poscolorbg.fw,
.fo4poscolorbg.ss,
.fo4poscolorbg.cf,
.fo4poscolorbg.rf,
.fo4poscolorbg.lf,
.fo4poscolorbg.lw,
.fo4poscolorbg.rw,
.fo4poscolorbg.st,
.fo4poscolorbg.ls,
.fo4poscolorbg.rs {
  background-color: #af1616;
}

.fo4poscolorbg.mf,
.fo4poscolorbg.cam,
.fo4poscolorbg.rm,
.fo4poscolorbg.lm,
.fo4poscolorbg.cdm,
.fo4poscolorbg.rdm,
.fo4poscolorbg.ldm,
.fo4poscolorbg.cm,
.fo4poscolorbg.rcm,
.fo4poscolorbg.lcm {
  background-color: #41a01c;
}

.fo4poscolorbg.df,
.fo4poscolorbg.cb,
.fo4poscolorbg.rcb,
.fo4poscolorbg.lcb,
.fo4poscolorbg.sw,
.fo4poscolorbg.rb,
.fo4poscolorbg.lb,
.fo4poscolorbg.rwb,
.fo4poscolorbg.lwb {
  background-color: #1e4ca8;
}

.fo4poscolorbg.gk {
  background-color: #cda20b;
}

.player-edit-ovr {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 0.9;
  color: #f3c443;
}

.player-edit-close {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #a7b1be;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.player-edit-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}

.player-edit-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #edf3fa;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.player-edit-action svg {
  width: 18px;
  height: 18px;
}

.player-edit-action--search {
  color: #9fd5ff;
}

.player-edit-action--delete {
  color: #ff8b8b;
}

.player-edit-section {
  margin: 0 18px 18px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.player-edit-label {
  display: block;
  margin-bottom: 10px;
  color: #dce5f0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
}

.player-edit-grade-picker,
.player-edit-bonus-picker {
  display: grid;
  gap: 6px;
}

.player-edit-grade-picker {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-bottom: 16px;
}

.player-edit-bonus-picker {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 16px;
}

.player-edit-grade-picker + .player-edit-label {
  margin-top: 0;
}

.player-edit-grade-option,
.player-edit-bonus-option {
  appearance: none;
  -webkit-appearance: none;
  -webkit-user-select: none;
  user-select: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    opacity 0.16s ease,
    filter 0.16s ease;
}

.player-edit-grade-option {
  width: 100%;
  aspect-ratio: 34 / 21;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 2px 6px rgba(0, 0, 0, 0.18);
  opacity: 0.6;
  filter: brightness(0.72) saturate(0.75);
  color: rgba(255, 255, 255, 0.86);
}

.player-edit-grade-option.is-active {
  transform: translateY(-1px) scale(1.04);
  border-color: rgba(255, 223, 122, 0.88);
  box-shadow:
    0 0 0 2px rgba(255, 214, 107, 0.42),
    0 6px 14px rgba(0, 0, 0, 0.24);
  opacity: 1;
  filter: brightness(1.08) saturate(1.04);
  color: #fff;
}

.player-edit-grade-option.grade-tone-base {
  background: linear-gradient(180deg, #515a69 0%, #313742 100%);
}

.player-edit-grade-option.grade-tone-bronze {
  background: linear-gradient(180deg, #d1a05d 0%, #996432 100%);
  color: #2a1808;
}

.player-edit-grade-option.grade-tone-silver {
  background: linear-gradient(180deg, #d4d7de 0%, #8e95a5 100%);
  color: #1f2530;
}

.player-edit-grade-option.grade-tone-gold {
  background: linear-gradient(180deg, #f0c977 0%, #b97b26 100%);
  color: #281707;
}

.player-edit-grade-option.grade-tone-legend {
  background: linear-gradient(135deg, #d8dce5 0%, #8bd2ef 62%, #4aa4dd 100%);
  color: #102332;
}

.player-edit-bonus-option {
  min-height: 32px;
  border-radius: 9px;
  background: linear-gradient(180deg, #2a313d 0%, #171c25 100%);
  color: #c7d2e3;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 3px 8px rgba(0, 0, 0, 0.16);
}

.player-edit-bonus-option.is-active {
  transform: translateY(-1px) scale(1.02);
  border-color: rgba(255, 214, 107, 0.72);
  background: linear-gradient(180deg, #ffd66b 0%, #db9223 100%);
  color: #221507;
  box-shadow:
    0 0 0 2px rgba(255, 214, 107, 0.24),
    0 8px 16px rgba(120, 82, 9, 0.22);
}

.player-edit-grade-option:hover,
.player-edit-bonus-option:hover {
  opacity: 1;
}

.player-edit-class-section {
  min-height: 52px;
}

.player-edit-class-status {
  color: #a9b5c5;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.player-edit-class-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(34px, 1fr));
  gap: 5px;
}

.player-edit-class-option {
  appearance: none;
  -webkit-appearance: none;
  -webkit-user-select: none;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #252d38 0%, #171c25 100%);
  color: #dce5f0;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 3px 8px rgba(0, 0, 0, 0.16);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}

.player-edit-class-option[disabled] {
  pointer-events: none;
}

.player-edit-class-option:hover,
.player-edit-class-option:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 214, 107, 0.44);
  box-shadow:
    0 0 0 2px rgba(255, 214, 107, 0.16),
    0 8px 16px rgba(0, 0, 0, 0.22);
}

.player-edit-class-option__badge {
  max-width: 28px;
  height: 22.4px;
  flex-shrink: 0;
}

.player-edit-class-option__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.16s ease;
}

.player-edit-class-option:hover .player-edit-class-option__overlay,
.player-edit-class-option:focus-visible .player-edit-class-option__overlay {
  opacity: 1;
}

.player-edit-class-option__delta-text {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #f5f8fc;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.player-edit-class-option__delta-text[data-tone="up"] {
  color: #7ce5a4;
}

.player-edit-class-option__delta-text[data-tone="down"] {
  color: #ff9a9a;
}

.player-edit-class-option__delta-text[data-tone="same"] {
  color: #f5f8fc;
}

.player-edit-class-option.is-current {
  cursor: default;
  opacity: 0.42;
  filter: grayscale(0.25);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 2px 6px rgba(0, 0, 0, 0.14);
}

.player-edit-class-option.is-current .player-edit-class-option__overlay {
  opacity: 0;
}

/* ─── Search Modal ─── */
.search-overlay {
  position: fixed;
  inset: 0;
  padding: 8px;
  z-index: 1000;
  background: var(--modal-backdrop-bg);
  backdrop-filter: blur(var(--modal-backdrop-blur));
  -webkit-backdrop-filter: blur(var(--modal-backdrop-blur));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}
.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-modal {
  width: 100%;
  max-width: 520px;
  height: min(720px, calc(100dvh - 16px));
  max-height: min(720px, calc(100dvh - 16px));
  background: linear-gradient(180deg, #27303d 0%, #202733 100%);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: none;
}
.search-overlay.active .search-modal {
  transform: translateY(0);
}

.search-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: linear-gradient(180deg, #303a49 0%, #283342 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-header__brand {
  display: none;
}

.search-header__brand-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.search-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #c7d0dc;
  font-size: 22px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  transition:
    background 0.2s,
    color 0.2s;
}
.search-close:hover {
  background: rgba(248, 81, 73, 0.15);
  color: #f85149;
}

.search-tabs {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  min-width: 0;
  padding: 3px;
  border-radius: 14px;
  background: rgba(21, 28, 38, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 1px 0 rgba(0, 0, 0, 0.18);
}

.search-tab {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px 10px 9px 9px;
  background: linear-gradient(180deg, #404d60 0%, #394658 100%);
  color: rgba(228, 236, 244, 0.76);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 7px;
  min-width: 0;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.search-tab svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.search-tab:hover {
  color: #f3f7fb;
  background: linear-gradient(180deg, #465367 0%, #3e4b5e 100%);
}

.search-tab.is-active {
  border-color: rgba(255, 207, 70, 0.48);
  background: linear-gradient(
    180deg,
    rgba(255, 214, 107, 0.3) 0%,
    rgba(240, 167, 22, 0.16) 100%
  );
  color: #fff7d6;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 1px 8px rgba(240, 167, 22, 0.14);
}

.search-body {
  display: grid;
  flex: 1;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
}

.search-form-pane,
.search-results-pane {
  min-width: 0;
  min-height: 0;
}

.search-form-pane {
  display: flex;
  flex-direction: column;
}

.search-results-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.search-tabs--results-pane {
  display: none;
}

.search-results-pane__intro {
  display: none;
}

.search-panel {
  display: none;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.search-panel.is-active {
  display: flex;
  flex-direction: column;
}

.search-panel--form {
  position: relative;
  overflow-y: auto;
  padding: 12px;
  gap: 10px;
  background: #242d39;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.search-panel--form::-webkit-scrollbar {
  width: 4px;
}

.search-panel--form::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.search-panel--form::-webkit-scrollbar-track {
  background: transparent;
}

.search-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.search-mobile-submit-bar {
  display: none;
}

.search-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.search-field--wide {
  grid-column: 1 / -1;
}

.search-primary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: stretch;
}

.search-field--primary {
  min-width: 0;
}

.search-field--team {
  min-width: 0;
}

.search-field--with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 6px;
}

.search-combobox {
  position: relative;
  min-width: 0;
}

.search-combobox > input {
  padding-right: 36px;
}

.search-combobox-clear {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: rgba(184, 193, 205, 0.18);
  color: rgba(203, 210, 219, 0.9);
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.search-combobox-clear:hover,
.search-combobox-clear:focus-visible {
  background: rgba(184, 193, 205, 0.28);
  color: #eef3f8;
  outline: none;
}

.search-combobox-clear[hidden] {
  display: none;
}

.search-combobox-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 20;
  display: none;
  max-height: 220px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid rgba(255, 212, 92, 0.24);
  border-radius: 10px;
  background: #303a49;
  box-shadow: 0 16px 32px rgba(6, 10, 16, 0.34);
  overscroll-behavior: contain;
}

.search-combobox-menu.is-open {
  display: block;
}

.search-combobox-menu--floating {
  z-index: 1102;
}

.search-combobox-menu--mobile-sheet {
  position: fixed;
  left: 10px;
  right: 10px;
  top: auto;
  bottom: 10px;
  z-index: 45;
  max-height: none;
  padding: 8px;
  border-color: rgba(255, 212, 92, 0.28);
  border-radius: 14px;
  background: #2b3442;
  box-shadow: 0 18px 36px rgba(6, 10, 16, 0.44);
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.search-mobile-combobox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1101;
  display: none;
  background: var(--modal-backdrop-bg);
  backdrop-filter: blur(var(--modal-backdrop-blur));
  -webkit-backdrop-filter: blur(var(--modal-backdrop-blur));
}

.search-mobile-combobox-overlay.active {
  display: block;
}

.search-mobile-combobox-sheet {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) 14px
    max(16px, calc(env(safe-area-inset-bottom) + 16px));
  background: linear-gradient(180deg, #27303d 0%, #202733 100%);
}

.search-mobile-combobox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.search-mobile-combobox-title {
  color: #eef3f8;
  font-size: 18px;
  font-weight: 800;
}

.search-mobile-combobox-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: #3a4655;
  color: #dce5f0;
  font-size: 26px;
  line-height: 1;
}

.search-mobile-combobox-input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 207, 70, 0.34);
  border-radius: 10px;
  background: #2b3442;
  color: #f5f8fc;
  font-family: inherit;
  font-size: 16px;
  outline: none;
}

.search-mobile-combobox-results {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(255, 212, 92, 0.18);
  border-radius: 12px;
  background: rgba(18, 24, 33, 0.28);
  -webkit-overflow-scrolling: touch;
}

.search-combobox-option {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #f5f8fc;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.search-combobox-option:hover,
.search-combobox-option:focus-visible {
  background: rgba(255, 212, 92, 0.14);
  outline: none;
}

.search-combobox-group {
  padding: 8px 10px 6px;
  color: #9fdaab;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.search-combobox-group--mobile {
  padding-top: 10px;
}

.search-combobox-option--league {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-combobox-empty {
  padding: 9px 10px;
  color: rgba(238, 243, 249, 0.58);
  font-size: 13px;
  font-weight: 700;
}

.search-field input,
.search-field select,
.search-foot-field,
.search-range-field {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #e6edf3;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.search-field input {
  padding: 0 11px;
  background: #2b3442;
  border-color: rgba(255, 221, 74, 0.2);
  color: #f5f8fc;
}

.search-field select {
  padding: 0 11px;
  background: #303a49;
  color: #e6edf3;
}

.search-field select {
  appearance: auto;
}

.search-field select option {
  background: #303a49;
  color: #e6edf3;
}

.search-field input:focus,
.search-field select:focus,
.search-range-field:focus-within {
  border-color: rgba(255, 207, 70, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 207, 70, 0.1);
}

.search-range-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  padding: 0 8px;
  gap: 6px;
  background: #2b3442;
  border-color: rgba(255, 221, 74, 0.18);
}

.search-foot-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  padding: 0 8px;
  gap: 6px;
  background: #2b3442;
  border-color: rgba(255, 221, 74, 0.18);
}

.search-foot-field select {
  width: 100%;
  min-width: 0;
  height: 30px;
  border: 0;
  background: transparent;
  padding: 0 8px;
  color: rgba(230, 237, 243, 0.82);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  outline: none;
}

.search-foot-field select option {
  background: #303a49;
  color: #e6edf3;
}

.search-range-label {
  min-width: 34px;
  color: rgba(230, 237, 243, 0.68);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.search-range-field input {
  width: 100%;
  min-width: 0;
  height: 30px;
  border: 0;
  background: transparent;
  color: #ffdd4a;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 16px;
  font-weight: 700;
  outline: none;
  text-align: center;
  -moz-appearance: textfield;
}

.search-range-field input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.search-range-field input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.search-range-field input::placeholder {
  color: rgba(230, 237, 243, 0.36);
}

.search-range-separator {
  color: rgba(230, 237, 243, 0.42);
  font-weight: 800;
}

.search-field-action {
  min-width: 0;
}

.search-field-action input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.search-field-action__icon {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #364454;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(238, 243, 249, 0.76);
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s,
    transform 0.2s;
}

.search-field-action--history {
  background: #364454;
}

.search-field-action--history svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-field-action:hover .search-field-action__icon {
  border-color: rgba(255, 212, 92, 0.36);
  color: #fff4c8;
}

.search-field-action input:checked + .search-field-action__icon {
  border-color: rgba(255, 212, 92, 0.55);
  background: linear-gradient(180deg, #ffd45c 0%, #f0a716 100%);
  color: #201604;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.search-position-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-position-block--inline {
  grid-column: 1 / -1;
  margin-top: -2px;
}

.search-season-block {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  margin-top: -2px;
}

.search-season-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}

.search-season-server-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
}

.search-season-server-button,
.search-season-option {
  border: 0;
  cursor: pointer;
  font-family: "Barlow Condensed", "Noto Sans Thai", sans-serif;
}

.search-season-server-button {
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(230, 237, 243, 0.82);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0.38;
  filter: grayscale(0.2) saturate(0.72) brightness(0.75);
  transition:
    opacity 0.18s ease,
    filter 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.search-season-server-button__flag {
  width: 18px;
  height: 13px;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.search-season-server-button__all {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 0.92;
  transform: translateY(0.5px);
}

.search-season-server-button__all-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.search-season-server-button__all-sub {
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.82;
  text-transform: uppercase;
}

.search-season-server-button:hover,
.search-season-server-button:focus-visible {
  opacity: 0.72;
  filter: grayscale(0.08) saturate(0.92) brightness(0.92);
  outline: none;
}

.search-season-server-button.is-active {
  background: rgba(255, 212, 92, 0.08);
  color: #fff4c6;
  opacity: 1;
  filter: none;
}

.search-season-server-row.is-all-active .search-season-server-button {
  opacity: 1;
  filter: none;
}

.search-season-search {
  min-width: 0;
}

.search-season-search input {
  text-transform: none;
}

.search-season-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(34px, 1fr));
  gap: 5px;
}

.search-season-option {
  min-height: 26px;
  padding: 2px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: #eef3f8;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.16);
  transition:
    opacity 0.18s ease,
    filter 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.search-season-option__badge {
  width: 100%;
  max-width: 28px;
  height: 22.4px;
  display: block;
  flex: 0 0 auto;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  filter: saturate(0.92) brightness(0.92);
  transition:
    transform 0.16s ease,
    filter 0.16s ease;
}

.search-season-option:hover,
.search-season-option:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.search-season-grid.has-selection .search-season-option:not(.is-active) {
  opacity: 0.68;
  filter: saturate(0.82) brightness(0.86);
}

.search-season-grid.has-selection
  .search-season-option:not(.is-active)
  .search-season-option__badge {
  filter: saturate(0.8) brightness(0.84);
}

.search-season-option.is-active {
  background: linear-gradient(
    180deg,
    rgba(255, 229, 145, 0.34) 0%,
    rgba(255, 190, 54, 0.18) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 0 0 2px rgba(255, 214, 79, 0.95),
    0 0 0 4px rgba(255, 214, 79, 0.24),
    0 6px 16px rgba(240, 167, 22, 0.34);
  transform: translateY(-1px);
}

.search-season-option.is-active .search-season-option__badge {
  transform: scale(1.12);
  filter: saturate(1.22) brightness(1.16);
}

.search-season-empty {
  color: rgba(230, 237, 243, 0.56);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 2px 0;
}

.search-position-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(34px, 1fr));
  gap: 6px;
  overflow: visible;
  user-select: none;
  -webkit-user-select: none;
}

.search-position-choices::-webkit-scrollbar {
  display: none;
}

.search-position-option {
  --pos-choice-bg: rgba(255, 255, 255, 0.08);
  --pos-choice-border: rgba(255, 255, 255, 0.18);
  --pos-choice-bg-active: rgba(255, 207, 70, 0.36);
  --pos-choice-glow: rgba(255, 207, 70, 0.34);
  min-width: 36px;
  min-height: 26px;
  border: 0;
  border-radius: 6px;
  background: var(--pos-choice-bg);
  color: rgb(203 203 203 / 88%);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  opacity: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.16);
}

.search-position-option[data-position="ST"],
.search-position-option[data-position="CF"],
.search-position-option[data-position="LW"],
.search-position-option[data-position="RW"] {
  --pos-choice-bg: rgba(224, 76, 92, 0.22);
  --pos-choice-bg-active: linear-gradient(
    180deg,
    rgba(255, 107, 122, 0.96) 0%,
    rgba(210, 43, 65, 0.96) 100%
  );
  --pos-choice-border: rgba(255, 129, 143, 0.62);
  --pos-choice-glow: rgba(224, 76, 92, 0.34);
}

.search-position-option[data-position="CAM"],
.search-position-option[data-position="LM"],
.search-position-option[data-position="RM"],
.search-position-option[data-position="CM"],
.search-position-option[data-position="CDM"] {
  --pos-choice-bg: rgba(47, 181, 120, 0.22);
  --pos-choice-bg-active: linear-gradient(
    180deg,
    rgba(76, 219, 151, 0.95) 0%,
    rgba(27, 145, 90, 0.96) 100%
  );
  --pos-choice-border: rgba(100, 232, 169, 0.6);
  --pos-choice-glow: rgba(53, 201, 132, 0.3);
}

.search-position-option[data-position="LWB"],
.search-position-option[data-position="RWB"],
.search-position-option[data-position="LB"],
.search-position-option[data-position="RB"],
.search-position-option[data-position="CB"] {
  --pos-choice-bg: rgba(62, 132, 245, 0.22);
  --pos-choice-bg-active: linear-gradient(
    180deg,
    rgba(102, 173, 255, 0.95) 0%,
    rgba(43, 97, 214, 0.96) 100%
  );
  --pos-choice-border: rgba(126, 190, 255, 0.62);
  --pos-choice-glow: rgba(69, 142, 255, 0.32);
}

.search-position-option[data-position="GK"] {
  --pos-choice-bg: rgba(234, 175, 64, 0.24);
  --pos-choice-bg-active: linear-gradient(
    180deg,
    rgba(255, 211, 102, 0.96) 0%,
    rgba(224, 149, 27, 0.96) 100%
  );
  --pos-choice-border: rgba(255, 217, 116, 0.66);
  --pos-choice-glow: rgba(250, 188, 72, 0.34);
}

.search-position-option.is-active {
  border-color: var(--pos-choice-border);
  background: var(--pos-choice-bg-active);
  color: #fffdf5;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 0 0 1px var(--pos-choice-glow),
    0 4px 12px rgba(0, 0, 0, 0.28);
  filter: saturate(1.18) brightness(1.06);
  opacity: 1;
}

.search-reset,
.search-submit {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.search-reset {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(230, 237, 243, 0.75);
}

.search-reset--icon {
  width: 38px;
  min-width: 38px;
  padding: 0;
  border-color: rgba(248, 81, 73, 0.18);
  background: rgba(248, 81, 73, 0.1);
  color: rgba(255, 176, 171, 0.8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-reset--icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-reset--icon:hover,
.search-reset--icon:focus-visible {
  background: rgba(248, 81, 73, 0.16);
  color: rgba(255, 196, 192, 0.92);
  outline: none;
}

.search-submit {
  border: 1px solid rgba(255, 214, 79, 0.42);
  background: linear-gradient(180deg, #ffcf46 0%, #f0a716 100%);
  color: #1c1304;
}

.search-input-wrap {
  position: sticky;
  top: 65px;
  z-index: 3;
  padding: 14px 20px;
  background: linear-gradient(180deg, #171b22 0%, rgba(23, 27, 34, 0.96) 100%);
}
.search-icon {
  position: absolute;
  left: 34px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #484f58;
  pointer-events: none;
}
.search-input-wrap input {
  width: 100%;
  padding: 12px 44px 12px 44px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #e6edf3;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}
.search-input-wrap input:focus {
  border-color: rgba(31, 111, 235, 0.5);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.15);
}
.search-input-wrap input::placeholder {
  color: #484f58;
}

.search-spinner {
  position: absolute;
  right: 34px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: #1f6feb;
  border-radius: 50%;
  display: none;
}
.search-spinner.active {
  display: block;
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

.search-results {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-content: start;
  overscroll-behavior: contain;
}
.search-results::-webkit-scrollbar {
  width: 4px;
}
.search-results::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  color: #484f58;
  font-size: 14px;
}
.search-empty-icon {
  font-size: 40px;
  opacity: 0.4;
}

.search-empty--detailed {
  gap: 10px;
}

.search-empty-title {
  font-size: 20px;
  font-weight: 800;
  color: #e8eef5;
}

.search-empty-copy,
.search-empty-hint {
  max-width: 420px;
  color: #aeb9c6;
  text-align: center;
}

.search-empty-summary {
  width: min(100%, 420px);
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.search-empty-summary-title {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f3c443;
}

.search-empty-filter-list {
  display: grid;
  gap: 8px;
}

.search-empty-filter-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
}

.search-empty-filter-label {
  color: #9aa8b8;
  font-weight: 700;
}

.search-empty-filter-value {
  min-width: 0;
  color: #eef3f8;
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* ─── Search Result Rows ─── */
.sr-row {
  position: relative;
  display: grid;
  grid-template-columns: 26px 38px minmax(0, 1fr) 36px 38px 30px;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  width: 100%;
  padding: 2px 8px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: default;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}
.sr-row:hover {
  transform: none;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.04);
}
.sr-row:focus-visible {
  outline: 2px solid rgba(255, 196, 63, 0.7);
  outline-offset: 2px;
}

.sr-row__favorite {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.sr-row__favorite:hover {
  color: #ffd56a;
  border-color: rgba(255, 213, 106, 0.35);
  background: rgba(255, 213, 106, 0.08);
}

.sr-row__favorite.is-active {
  color: #ffcf5a;
  background: linear-gradient(
    180deg,
    rgba(255, 209, 92, 0.2),
    rgba(255, 154, 55, 0.16)
  );
  border-color: rgba(255, 209, 92, 0.42);
}

.sr-row__favorite:active {
  transform: scale(0.96);
}

.sr-row__favorite-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.sr-row__face-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 50% 18%,
      rgba(255, 255, 255, 0.28),
      transparent 40%
    ),
    linear-gradient(180deg, #384250 0%, #1a2028 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sr-row__face-wrap.is-fallback::before {
  content: "FC";
  font-family: "Barlow Condensed", sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.72);
}

.sr-row__face {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  user-select: none;
  -webkit-user-drag: none;
}

.sr-row__face-surface {
  position: absolute;
  inset: 0;
  z-index: 2;
  user-select: none;
  cursor: default;
}

.sr-row__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sr-row__name-line {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.sr-row__name-line .badged {
  width: 19px;
  height: 15px;
  display: block;
  flex-shrink: 0;
}

.sr-row__name {
  min-width: 0;
  font-size: 15px;
  font-weight: 800;
  color: #f7fbff;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sr-row__liveperf {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.sr-row__liveperf--up {
  color: #9fe870;
}

.sr-row__liveperf--down {
  color: #ff6b6b;
}

.sr-row__liveperf-arrow {
  font-size: 11px;
  line-height: 1;
}

.sr-row__liveperf-value {
  line-height: 1;
}

.sr-row__meta {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex-wrap: nowrap;
  overflow: hidden;
}

.sr-row__fp {
  position: relative;
  width: 20px;
  height: 22px;
  flex: 0 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff3ca;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.sr-row__fp .hexagon-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sr-row__fp .hexagon-svg path {
  stroke: rgba(255, 241, 204, 0.55);
  fill: rgba(25, 25, 25, 0.32);
}

.sr-row__fp .pay-number {
  position: relative;
  z-index: 1;
}

.sr-row__skill {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.28);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.sr-row__skill-star {
  color: rgba(255, 255, 255, 0.28);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.38);
}

.sr-row__skill-star.is-active {
  color: #f6b21a;
}

.sr-row__pos-list {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.sr-row__pos-list--meta {
  gap: 5px;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  overflow: hidden;
}

.sr-row__pos-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.sr-row__pos-tag {
  min-width: 22px;
  height: 14px;
  padding: 0 4px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sr-row__pos-value {
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.sr-row__foot {
  display: none;
  align-items: center;
  gap: 2px;
  padding: 0;
  justify-self: end;
}

.sr-row__foot-badge,
.prefootl0,
.prefootl1,
.prefootr0,
.prefootr1 {
  width: 11px;
  height: 22px;
  flex: 0 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  max-width: 100%;
  background-image: url("../images/foot.png");
  background-repeat: no-repeat;
  background-size: 100% 400%;
}

.prefootl0 {
  background-position: 0 0;
}

.prefootl1 {
  background-position: 0 33.333333%;
}

.prefootr0 {
  background-position: 0 66.666667%;
}

.prefootr1 {
  background-position: 0 100%;
}

.sr-row__foot-value {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  position: relative;
  z-index: 1;
  transform: translateY(-1px);
}

.sr-row__foot-value--weak {
  color: #f5f8fc;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.35);
}

.sr-row__foot-value--pref {
  color: #f5f8fc;
  text-shadow: 0 0 12px rgba(142, 255, 74, 0.25);
}

.sr-row__rating {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding-left: 4px;
  justify-self: end;
}

.sr-row__rating-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #f3c443;
}

.sr-row__ovr {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 23px;
  font-weight: 700;
  line-height: 0.9;
  color: #ff47d8;
  text-shadow: 0 0 12px rgba(255, 71, 216, 0.22);
}

.sr-row__add {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 214, 79, 0.42);
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  justify-self: end;
  background:
    radial-gradient(
      circle at 35% 30%,
      rgba(255, 255, 255, 0.22),
      transparent 48%
    ),
    linear-gradient(180deg, #ffcf46 0%, #f0a716 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 10px 18px rgba(240, 167, 22, 0.28);
  color: #1c1304;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.sr-row__add.is-disabled,
.sr-row__add:disabled {
  cursor: not-allowed;
  background: linear-gradient(
    180deg,
    rgba(117, 124, 138, 0.92),
    rgba(77, 82, 92, 0.94)
  );
  box-shadow: none;
  color: rgba(255, 255, 255, 0.78);
  opacity: 0.78;
}

.sr-row__add.is-disabled:hover,
.sr-row__add:disabled:hover {
  transform: none;
  box-shadow: none;
}

.sr-row__add span {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-1px);
}

.sr-row__add:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 14px 24px rgba(240, 167, 22, 0.34);
  filter: saturate(1.06);
}

.sr-row__add:active {
  transform: scale(0.96);
}

.sr-row__add:focus-visible {
  outline: 2px solid rgba(255, 214, 79, 0.8);
  outline-offset: 2px;
}

/* ─── Responsive ─── */
@media (min-width: 600px) {
  .search-results {
    gap: 0;
  }
  .search-modal {
    border-radius: 20px;
    height: min(860px, calc(100dvh - 72px));
    max-height: min(860px, calc(100dvh - 72px));
    margin-bottom: 0;
  }
  .search-overlay {
    align-items: center;
  }
  .search-overlay.active .search-modal {
    transform: translateY(0);
  }
  .squad-library-modal {
    border-radius: 20px;
    min-height: min(860px, calc(100dvh - 72px));
    height: min(860px, calc(100dvh - 72px));
    max-height: min(860px, calc(100dvh - 72px));
  }
  .search-modal {
    transform: translateY(40px) scale(0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .sr-row {
    grid-template-columns: 26px 40px minmax(0, 1fr) 30px 40px 30px;
    min-height: 52px;
    column-gap: 6px;
  }
  .sr-row__face-wrap {
    width: 40px;
    height: 40px;
  }
  .sr-row__foot {
    display: inline-flex;
    gap: 3px;
    justify-self: center;
  }
  .sr-row__foot-badge,
  .prefootl0,
  .prefootl1,
  .prefootr0,
  .prefootr1 {
    width: 11px;
    height: 23px;
    flex: 0 0 11px;
  }
  .sr-row__foot-value {
    font-size: 15px;
  }
  .sr-row__rating {
    width: 40px;
    padding-left: 0;
    align-items: center;
    justify-self: center;
  }
  .sr-row__ovr {
    font-size: 24px;
  }
  .sr-row__add {
    justify-self: end;
  }
}

@media (min-width: 601px) {
  .team-color-items {
    margin-top: 11px;
  }
}

@media (min-width: 900px) {
  .search-modal {
    max-width: 1180px;
  }
  .search-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    overflow: hidden;
  }
  .search-form-pane {
    min-width: 0;
    padding: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, #25303c 0%, #222b36 100%);
  }
  .search-results-pane {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(180deg, #212934 0%, #1d242d 100%);
  }
  .search-header__brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-self: center;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: rgba(233, 240, 246, 0.9);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    pointer-events: none;
    white-space: nowrap;
  }
  .search-header .search-tabs {
    display: none;
  }
  .search-tabs--results-pane {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 14px 12px 0;
  }
  .search-panel--form {
    position: sticky;
    top: 0;
    max-height: calc(min(860px, calc(100dvh - 72px)) - 24px);
    overflow-y: auto;
    border-radius: 16px;
  }
  .search-results-pane .search-panel {
    display: none;
    min-height: 0;
  }
  .search-results-pane .search-panel.is-active {
    display: flex;
    flex-direction: column;
  }
  .search-position-choices {
    grid-template-columns: repeat(15, minmax(0, 1fr));
    gap: 5px;
  }
  .search-position-option {
    min-width: 0;
    min-height: 24px;
    padding: 0 4px;
    font-size: 12px;
    border-radius: 5px;
  }
  .search-results {
    padding: 8px 12px 12px;
  }
  .sr-row {
    grid-template-columns: 26px 45px minmax(0, 1fr) 38px 42px 32px;
    min-height: 55px;
    column-gap: 7px;
  }
  .sr-row__face-wrap {
    width: 45px;
    height: 45px;
  }
  .sr-row__name {
    font-size: 16px;
  }
  .sr-row__fp {
    font-size: 12px;
  }
  .sr-row__skill {
    font-size: 12px;
  }
  .sr-row__pos-value {
    font-size: 11px;
  }
  .sr-row__foot {
    display: inline-flex;
    gap: 4px;
    margin-right: 0;
    justify-self: center;
  }
  .sr-row__foot-badge,
  .prefootl0,
  .prefootl1,
  .prefootr0,
  .prefootr1 {
    width: 12px;
    height: 24px;
    flex: 0 0 12px;
  }
  .sr-row__foot-value {
    font-size: 16px;
    transform: translateY(-1px);
  }
  .sr-row__rating {
    width: 42px;
    padding-left: 0;
    margin-right: 0;
    align-items: center;
    justify-self: center;
  }
  .sr-row__rating-label {
    letter-spacing: 0.12em;
  }
  .sr-row__ovr {
    font-size: 25px;
  }
  .sr-row__add {
    width: 30px;
    height: 30px;
    justify-self: center;
  }
}

@media (max-width: 600px) {
  .hdr-logo {
    font-size: 0;
    letter-spacing: 0;
  }
  .hdr-logo::before {
    content: "FA";
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1;
    transform: translateY(-2px);
  }
  .hdr-logo span {
    display: none;
  }
  .player-edit-overlay {
    padding: 12px;
    align-items: center;
  }
  .player-edit-modal {
    width: 100%;
    max-height: calc(100dvh - env(safe-area-inset-top) - 24px);
    border-radius: 22px 22px 18px 18px;
  }
  .player-edit-header {
    padding-top: calc(18px + env(safe-area-inset-top));
  }
  .player-edit-face-wrap {
    width: 74px;
    height: 74px;
  }
  .player-edit-name {
    font-size: 20px;
  }
  .player-edit-badge {
    width: 18px;
    height: 15px;
  }
  .player-edit-ovr {
    font-size: 32px;
  }
  .player-edit-pos-list {
    gap: 6px 8px;
  }
  .player-edit-pos-tag {
    min-width: 30px;
    height: 18px;
    padding: 0 6px;
    font-size: 10px;
  }
  .player-edit-pos-value {
    font-size: 13px;
  }
  .player-edit-grade-picker,
  .player-edit-bonus-picker {
    gap: 5px;
  }
  .player-edit-grade-option {
    border-radius: 4px;
    font-size: 12px;
  }
  .player-edit-bonus-option {
    min-height: 30px;
    font-size: 14px;
    border-radius: 8px;
  }
  .card-edit-btn {
    top: -2%;
    left: -4%;
    width: 30%;
  }
  .search-overlay {
    padding: 0;
  }
  .search-modal {
    height: calc(100dvh - env(safe-area-inset-top) - 8px);
    max-height: calc(100dvh - env(safe-area-inset-top) - 8px);
    border-radius: 16px 16px 0 0;
  }
  .search-header {
    padding-top: calc(14px + env(safe-area-inset-top));
  }
  .search-input-wrap {
    top: calc(61px + env(safe-area-inset-top));
  }
  body {
    padding: 0;
  }
  .container {
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
  }
  .pitch-container {
    border-radius: 0;
  }
  .pitch-actions-bar {
    padding-top: 10px;
    gap: 8px;
  }
  .pitch-actions-bar__primary,
  .pitch-actions-bar__secondary {
    gap: 8px;
  }
  .squad-meta-card {
    margin: 14px 12px 4px;
  }
  .squad-meta-card__channel-row {
    gap: 10px;
  }
  .squad-meta-card__channel {
    gap: 10px;
  }
  .squad-meta-card__avatar {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
    font-size: 0.98rem;
  }
  .squad-meta-card__creator {
    font-size: 0.94rem;
  }
  .squad-meta-card__title {
    font-size: 0.84rem;
  }
  .squad-meta-card__actions {
    gap: 6px;
  }
  .squad-meta-card__action {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    gap: 6px;
    font-size: 0.94rem;
  }
  .squad-meta-card__action--icon-only {
    width: 36px;
    min-width: 36px;
    min-height: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    gap: 0;
  }
  .squad-meta-card__action svg {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }
  .squad-meta-card__action--icon-only svg {
    width: 15px;
    height: 15px;
    flex-basis: 15px;
  }
  .squad-meta-card__action--open-share.squad-library-item__share-link {
    width: 36px;
    min-width: 36px;
    min-height: 36px;
    height: 36px;
    border-radius: 8px;
  }
  .squad-meta-card__action--open-share.squad-library-item__share-link svg {
    width: 15px;
    height: 15px;
    flex-basis: 15px;
  }
  .squad-meta-card__inline-title-input {
    min-height: 40px;
    font-size: 0.96rem;
  }
  .squad-meta-card__inline-description-input {
    min-height: 92px;
    font-size: 0.9rem;
  }
  .top-shell {
    margin: 0;
  }
  .pitch {
    background-image: url("../images/ManagerModePitch.png");
    aspect-ratio: 1475 / 1856;
  }
  .zone-highlight {
    background-color: rgba(122, 255, 116, 0.12);
    border: 1px solid rgba(214, 255, 203, 0.42);
    box-shadow: inset 0 0 0 1px rgba(169, 255, 156, 0.08);
  }
  .pitch-highlight {
    background-color: rgba(102, 255, 84, 0.12);
    background-image: radial-gradient(
      ellipse at center,
      rgba(136, 255, 112, 0.68) 0%,
      rgba(110, 255, 92, 0.24) 44%,
      rgba(0, 255, 110, 0) 74%
    );
    box-shadow: 0 0 10px rgba(85, 255, 90, 0.12);
  }
  .player-card {
    width: 14%;
  }
  .cards-visible .player-card.has-player {
    width: 16.5%;
  }
  .cards-hidden .player-card.has-player {
    width: 18%;
  }
  .hdr {
    border-radius: 0;
  }
  .header-controls-bar {
    padding: 8px 8px 10px;
  }
  .header-controls-inner {
    gap: 8px;
  }
  .header-controls-actions {
    justify-content: flex-start;
    flex-wrap: nowrap;
    min-width: 0;
  }
  .header-controls-actions .formation-select {
    border-radius: 8px;
  }
  .header-controls-actions .squad-level-toggle {
    border-radius: 8px;
  }
  .header-controls-actions .card-view-toggle {
    border-radius: 8px;
  }
  .header-controls-actions .header-clear-squad-btn {
    border-radius: 8px;
  }
  .header-controls-actions--share-only {
    flex-wrap: nowrap;
    align-items: center;
  }
  .header-controls-actions--share-only .header-share-pill {
    min-height: 30px;
    padding: 6px 8px;
    border-radius: 8px;
    min-width: 0;
  }
  .header-controls-actions--share-only .card-view-toggle {
    border-radius: 8px;
  }
  .header-controls-actions--share-only .header-squad-action-btn--share-home {
    border-radius: 8px;
  }
  .header-controls-actions--share-only .header-share-pill:first-child {
    flex: 0 1 96px;
    width: 96px;
    min-width: 96px;
    max-width: 96px;
    justify-content: center;
  }
  .header-controls-actions--share-only .header-share-pill__label {
    display: none;
  }
  .header-controls-actions--share-only .header-share-pill__value {
    font-size: 12px;
    white-space: nowrap;
  }
  .header-controls-actions--share-only .header-squad-action-btn--share-home {
    width: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    gap: 0;
    flex: 0 0 32px;
    font-size: 0;
  }
  .header-controls-actions--share-only
    .header-squad-action-btn--share-home
    span {
    display: none;
  }
  .header-controls-actions--share-only
    .header-squad-action-btn--share-home
    svg {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
  }
  .header-squad-action-btn {
    min-width: 0;
    padding: 0 10px;
    font-size: 0.82rem;
    flex: 0 0 auto;
  }
  .header-clear-squad-btn {
    width: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    gap: 0;
    flex: 0 0 32px;
    font-size: 0;
  }
  .header-clear-squad-btn span {
    display: none;
  }
  .header-clear-squad-btn svg {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
  }
  .header-summary-strip {
    padding: 0;
  }
  .header-summary-inner {
    grid-template-columns: minmax(88px, 0.72fr) minmax(0, 1fr) minmax(
        100px,
        auto
      );
    gap: 6px;
  }
  .squad-library-overlay {
    align-items: flex-start;
    padding: max(8px, env(safe-area-inset-top)) 0 0;
  }
  .squad-library-modal {
    min-height: calc(100dvh - max(8px, env(safe-area-inset-top)));
    height: calc(100dvh - max(8px, env(safe-area-inset-top)));
    max-height: calc(100dvh - max(8px, env(safe-area-inset-top)));
    border-radius: 18px 18px 0 0;
  }
  .squad-library-body {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }
  .squad-library-form {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 12px 12px;
    gap: 10px;
    overflow: visible;
  }
  .squad-library-header {
    padding: calc(16px + env(safe-area-inset-top)) 14px 14px;
    gap: 12px;
  }
  .squad-library-heading {
    font-size: 1.08rem;
  }
  .squad-library-subtitle {
    margin-top: 4px;
    font-size: 0.84rem;
    line-height: 1.45;
  }
  .squad-library-close {
    width: 34px;
    height: 34px;
    font-size: 1.45rem;
  }
  .squad-library-field {
    gap: 6px;
    font-size: 0.84rem;
  }
  .squad-library-field input,
  .squad-library-field textarea {
    min-height: 42px;
    padding: 0 11px;
    border-radius: 12px;
  }
  .squad-library-field textarea {
    min-height: 92px;
    padding: 10px 11px;
  }
  .squad-library-switch {
    align-items: flex-start;
    gap: 9px;
    font-size: 0.84rem;
    line-height: 1.4;
  }
  .squad-library-switch input {
    margin-top: 2px;
  }
  .squad-library-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .squad-library-save,
  .squad-library-refresh,
  .squad-library-item__action {
    min-height: 38px;
    border-radius: 12px;
    font-size: 0.84rem;
  }
  .squad-library-toolbar {
    gap: 8px;
    padding: 6px;
    border-radius: 12px;
  }
  .squad-library-toolbar__actions {
    gap: 6px;
  }
  .squad-library-toolbar-btn {
    min-height: 30px;
    padding: 0 9px;
    border-radius: 9px;
    font-size: 0.74rem;
  }
  .squad-library-status {
    min-height: 0;
    padding: 11px 12px;
    border-radius: 12px;
    font-size: 0.83rem;
    line-height: 1.45;
  }
  .squad-library-section {
    padding: 14px;
    gap: 10px;
    min-height: 280px;
  }
  .squad-library-list {
    gap: 0;
    min-height: 0;
    padding-right: 0;
    overflow: auto;
  }
  .squad-library-item {
    align-items: center;
    gap: 8px;
    padding: 6px 6px;
    border-radius: 0;
    grid-template-columns: 28px minmax(0, 1fr) 34px;
  }
  .squad-library-item__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    justify-content: stretch;
    width: 100%;
  }
  .squad-library-item__title {
    font-size: 0.92rem;
  }
  .squad-library-item__summary {
    font-size: 0.72rem;
    line-height: 1.25;
  }
  .squad-library-item__badge {
    min-height: 20px;
    font-size: 0.68rem;
  }
  .squad-library-item__action {
    gap: 6px;
    padding: 0 10px;
    font-size: 0.83rem;
    width: 100%;
  }
  .squad-library-item__action-icon {
    width: 13px;
    height: 13px;
    flex-basis: 13px;
  }
  .shared-squad-dialog-overlay {
    padding: 14px;
  }
  .shared-squad-dialog-modal {
    border-radius: 14px;
  }
  .shared-squad-dialog-header {
    padding: 16px 16px 12px;
  }
  .shared-squad-dialog-message {
    font-size: 0.88rem;
  }
  .shared-squad-dialog-actions {
    padding: 0 16px 16px;
  }
  .shared-squad-dialog-cancel,
  .shared-squad-dialog-confirm {
    flex: 1 1 0;
    min-height: 42px;
  }
  .squad-share-overlay {
    padding: 14px;
    align-items: flex-end;
  }
  .squad-share-modal {
    width: 100%;
    border-radius: 18px 18px 14px 14px;
  }
  .squad-share-header {
    padding: 16px 16px 12px;
  }
  .squad-share-section,
  .squad-share-link-row {
    padding-inline: 16px;
  }
  .squad-share-link-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .squad-share-copy-btn {
    width: 100%;
  }
  .summary-card {
    border-radius: 10px;
    padding: 7px 8px;
  }
  .summary-card--team-color {
    width: 100%;
    padding: 6px 3px;
  }
  .team-color-strip {
    gap: 1px;
  }
  .team-color-strip .summary-card__head {
    margin-bottom: 0;
  }
  .team-color-items {
    flex-direction: row;
    align-items: center;
    gap: 0;
  }
  .team-color-strip .summary-edit-icon {
    flex-direction: column;
    min-width: 28px;
    height: 32px;
    padding: 0 4px;
    gap: 2px;
    font-size: 0.68rem;
    justify-content: center;
  }
  .team-color-strip .summary-edit-icon + .summary-edit-icon {
    border-left: 1px solid rgba(230, 237, 243, 0.22);
  }
  .team-color-strip .summary-edit-icon img {
    width: 13px;
    height: 13px;
    flex-basis: 13px;
  }
  .team-color-strip .summary-edit-icon span {
    min-width: 6px;
    line-height: 1;
  }
  .summary-fp-value #fpCurrentValue {
    font-size: 1.2rem;
  }
  .summary-fp-value #fpMaxValue,
  .summary-fp-divider {
    font-size: 0.86rem;
  }
  .summary-ovr-total-wrap {
    min-width: 38px;
  }
  .summary-ovr-total {
    font-size: 1.08rem;
  }
  .summary-ovr-value {
    font-size: 0.68rem;
  }
  .summary-ovr-bar,
  .summary-bar {
    height: 6px;
  }
  .summary-fp-caption,
  .summary-card__eyebrow {
    font-size: 0.5rem;
  }
  .formation-select,
  .card-view-toggle,
  .squad-level-toggle {
    min-height: 30px;
    padding: 5px 8px;
  }
  .formation-select {
    flex: 0 1 96px;
    width: 96px;
    min-width: 96px;
    max-width: 96px;
    font-size: 12px;
    padding: 6px 8px;
  }
  .card-view-toggle__label,
  .squad-level-toggle__label {
    font-size: 10px;
  }
  .card-view-toggle {
    gap: 6px;
  }
  .card-view-toggle__label {
    font-size: 10px;
  }
  .cards-visible .card-ovr,
  .cards-visible .fc-ovr {
    font-size: 20cqi;
  }
  .cards-visible .card-pos-label,
  .cards-visible .fc-pos {
    font-size: 13.5cqi;
  }
  .cards-visible .fc-name {
    font-size: 12.5cqi;
    line-height: 1;
  }
  .cards-visible .fc-name span {
    padding-inline-end: 0;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .cards-visible .card-player-name,
  .cards-visible .fc-name-area {
    bottom: 5%;
  }
  .cards-visible .card-flags,
  .cards-visible .fc-flags {
    transform: translateY(-3cqi);
  }
  .cards-hidden .card-player-media,
  .cards-hidden .fc-player-media {
    width: 80%;
    top: 6%;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
  }
  .cards-hidden .card-ovr,
  .cards-hidden .fc-ovr {
    top: 30%;
    left: -1%;
    font-size: 20px;
    font-weight: 500;
  }
  .cards-hidden .card-pos-label,
  .cards-hidden .fc-pos {
    top: 55%;
    left: 0;
    font-size: 12px;
    font-weight: 500;
  }
  .cards-hidden .card-player-name,
  .cards-hidden .fc-name-area {
    bottom: 3%;
    width: 154%;
    max-width: 154%;
  }
  .cards-hidden .fc-name {
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0;
    font-weight: 600;
  }
  .cards-hidden .fc-name .badged {
    width: 13px;
    height: 11px;
  }
  .cards-hidden .fc-salary {
    top: 33%;
    bottom: auto;
    right: 1%;
    width: clamp(15px, 19%, 22px);
    font-size: clamp(8px, 10px, 10px);
  }
  .cards-hidden .fc-grade {
    top: 57%;
    bottom: auto;
    right: -2%;
    width: clamp(15px, 25%, 25px);
    height: clamp(11px, 13%, 16px);
    font-size: clamp(8px, 10px, 10px);
  }
  .sr-row {
    grid-template-columns: 24px 40px minmax(0, 1fr) 36px 30px;
    gap: 6px;
    min-height: 52px;
    padding: 4px 6px;
  }
  .sr-row__favorite {
    width: 24px;
    height: 24px;
    border-radius: 0;
  }
  .sr-row__favorite-icon {
    width: 14px;
    height: 14px;
  }
  .sr-row__face-wrap {
    width: 40px;
    height: 40px;
    border-radius: 6px;
  }
  .sr-row__name {
    font-size: 15px;
  }
  .sr-row__name-line .badged {
    width: 19px;
    height: 15px;
  }
  .sr-row__pos-list {
    gap: 4px;
  }
  .sr-row__meta {
    gap: 4px;
    flex-wrap: nowrap;
    overflow: hidden;
  }
  .sr-row__skill {
    font-size: 11px;
    gap: 0;
  }
  .sr-row__pos-list--meta {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    overflow: hidden;
  }
  .sr-row__pos-item {
    flex: 0 0 auto;
    gap: 2px;
  }
  .sr-row__pos-tag {
    min-width: 22px;
    height: 14px;
    padding: 0 4px;
    font-size: 8px;
  }
  .sr-row__pos-value {
    font-size: 10px;
  }
  .sr-row__ovr {
    font-size: 20px;
  }
  .sr-row__rating {
    width: 34px;
    padding-left: 0;
  }
  .sr-row__add {
    width: 28px;
    height: 28px;
    border-radius: 7px;
  }
  .sr-row__add span {
    font-size: 21px;
  }
  .search-tabs {
    padding: 0;
    gap: 5px;
  }
  .search-tab {
    min-height: 32px;
    font-size: 12px;
  }
  .search-panel--form {
    padding: 12px 10px;
    gap: 12px;
  }
  .search-filter-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .search-mobile-submit-bar {
    position: sticky;
    bottom: 0;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
    align-items: center;
    margin: 4px -10px calc(-12px - env(safe-area-inset-bottom, 0px));
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(
      180deg,
      rgba(36, 45, 57, 0) 0%,
      rgba(18, 23, 30, 0.92) 26%,
      #12171e 100%
    );
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);
    transition:
      opacity 0.18s ease,
      transform 0.18s ease,
      visibility 0.18s ease;
  }
  .search-mobile-submit-bar.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .search-submit--mobile {
    width: 100%;
    min-height: 42px;
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
  }
  .search-reset--mobile {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    border-radius: 12px;
    justify-self: end;
  }
  .search-primary-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 7px;
  }
  .search-submit {
    padding: 0 14px;
  }
  .search-field--with-action {
    grid-template-columns: minmax(0, 1fr) 40px;
  }
  .search-position-choices {
    grid-template-columns: repeat(auto-fit, minmax(34px, 1fr));
    gap: 6px;
  }
  .search-position-option {
    min-width: 34px;
    min-height: 26px;
    font-size: 13px;
  }
}
