/* Weekly squad page and invariant 1–2–1 formation. */
:is(#weekly-view,#monthly-view):not([hidden]) {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 10px 18px;
}
:is(#weekly-view,#monthly-view) .hub-intro { margin: 10px 0 0 !important; padding: 0 !important; }
:is(#weekly-view,#monthly-view) .hub-intro .eyebrow,:is(#weekly-view,#monthly-view) .hub-intro p:not(.eyebrow) { display: none; }
:is(#weekly-view,#monthly-view) .hub-intro h1 { font-size: 28px !important; margin: 0 !important; line-height: 1.2; }
:is(#weekly-view,#monthly-view) > .hub-toolbar { margin: 10px 0 0 !important; gap: 8px; }
:is(#weekly-view,#monthly-view) > .hub-toolbar label { display: flex; align-items: center; gap: 8px; }
:is(#weekly-view,#monthly-view) > .hub-toolbar :is(button,select) { min-height: 38px; font-size: 11px; }
:is(#hub-week-feedback,#hub-month-feedback):empty { display: none; }
:is(#hub-week-pitch,#hub-month-pitch) { grid-column: 1/-1; width: 100%; }
.weekly-arena {
  width: min(100%,560px);
  max-width: 100%;
  margin: 0 auto;
  padding: 10px 12px;
  border: 1px solid #95b5b44a;
  border-radius: 16px;
  background: linear-gradient(135deg,#162c2c,#0c1b1d);
  box-shadow: 0 16px 40px #00151766;
}
.weekly-arena-heading { margin: 0; padding: 0 4px 8px; border: 0; }
.weekly-arena-heading > div > span { display: none; }
.weekly-arena-heading h2 { font-size: 19px !important; margin: 0; }
.weekly-arena-heading h2 b { font-size: 13px; color: #cdd9d5; }
.weekly-arena-heading > span { font-size: 10px; }
.weekly-stage { width: 100%; box-sizing: border-box; margin: auto; padding: 4px 10px 12px; }
.weekly-field:has(.totw-card) {
  --fit-scale: .53;
  width: 100%;
  height: var(--pitch-height,calc(100svh - 220px));
  min-height: 0;
  max-width: 100%;
  aspect-ratio: auto;
  display: grid;
  grid-template: repeat(3,minmax(0,1fr)) / repeat(2,minmax(0,1fr));
  align-items: center;
  justify-items: center;
  gap: 18px 16px;
  padding: 20px 16px 42px;
  border: 1px solid #b7d7c84a;
  border-radius: 10px;
  background: radial-gradient(ellipse at var(--lx,50%) var(--ly,30%),#6bceb51b,transparent 70%),repeating-linear-gradient(0deg,#16483d 0,#16483d 10%,#1a5246 10%,#1a5246 20%);
  box-shadow: 0 5px 0 #061d19,0 6px 0 #71978a66,0 12px 22px #0007,inset 0 0 55px #001f1a99;
}
.weekly-field-markings { inset: 16px 12px; border-color: #b9e4ce4a; }
.weekly-field-markings i { border-color: #b9e4ce4a; }
.weekly-center { width: 90px; height: 90px; }
.weekly-box { height: 13%; width: 54%; left: 23%; }
.weekly-field-signature { bottom: 7px; font-size: 5px; letter-spacing: .16em; }
.weekly-arena-note { font-size: 10px; line-height: 1.3; margin: 3px 0 0; }
.weekly-field .weekly-player:has(.totw-card) {
  width: calc(190px * var(--fit-scale));
  height: calc(272px * var(--fit-scale));
  max-width: none;
  position: relative;
  inset: auto;
  transform: translateZ(34px);
  margin: 0;
}
.weekly-field .weekly-player[data-formation="forward"] { grid-row: 1; grid-column: 1/-1; }
.weekly-field .weekly-player[data-formation="midfield"] { grid-row: 2; grid-column: 1; transform: translateY(-16px) translateZ(34px); }
.weekly-field .weekly-player[data-formation="defence"] { grid-row: 2; grid-column: 2; }
.weekly-field .weekly-player[data-formation="keeper"] { grid-row: 3; grid-column: 1/-1; }
.weekly-player > .totw-card {
  position: absolute;
  inset: 0 auto auto 0;
  transform: scale(var(--fit-scale));
  transform-origin: top left;
}
.weekly-week-picker {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #cebd8944;
  background: linear-gradient(135deg,#203b34,#10241f);
  padding: 5px;
  border-radius: 12px;
}
.weekly-week-picker select[hidden] { display: none !important; }
.weekly-week-picker > button { width: 34px; min-height: 38px !important; font-size: 24px !important; padding: 0 !important; border: 0; border-radius: 8px; background: #c5dcbd0d; color: #efdcaa; }
.weekly-week-picker > button:hover:not(:disabled) { background: #d6bc8833; }
.weekly-week-picker > button:disabled { opacity: .25; }
.weekly-week-current { display: grid; justify-items: center; gap: 3px; min-width: 120px; padding: 2px 10px; }
.weekly-week-current > span { font-size: 8px; letter-spacing: .1em; color: #cbbd91; }
.weekly-week-current > strong { font-size: 16px; font-weight: 800; color: #fff2d0; line-height: 1.3; }
@media (max-width:650px) {
  :is(#weekly-view,#monthly-view):not([hidden]) { grid-template-columns: minmax(0,1fr); gap: 8px; }
  :is(#weekly-view,#monthly-view) .hub-intro h1 { font-size: 22px !important; }
  :is(#weekly-view,#monthly-view) > .hub-toolbar { flex-wrap: wrap; justify-content: space-between; margin: 0 !important; }
  :is(#weekly-view,#monthly-view) > .hub-toolbar label { font-size: 10px; }
  :is(#weekly-view,#monthly-view) > .hub-toolbar button { font-size: 9px; padding: 7px; }
  .weekly-arena { padding: 8px 3px; }
  .weekly-stage { padding: 4px 0 12px; }
  .weekly-field:has(.totw-card) { height: var(--pitch-height,calc(100svh - 280px)); padding-inline: 12px; column-gap: 12px; }
  .weekly-arena-heading { padding: 0 6px 7px; }
  .weekly-week-picker > button { width: 26px; }
  .weekly-week-current { min-width: 95px; padding-inline: 4px; }
  .weekly-week-current > strong { font-size: 13px; }
}

/* Projektör and Akım cards share the stats grid and logo rail. */
.totw-card {
  --weekly-ink: #eff5e8;
  --weekly-muted: #b9dbbc;
  --orbit-ink: #6cb582;
  --orbit-core: #e2ffcf;
  --orbit-time: 4.8s;
  --orbit-tail: 15 85;
  --orbit-clip: 53%;
  background: transparent;
  clip-path: none;
  border-radius: 16px 16px 6px 6px;
  color: var(--weekly-ink);
  font-family: Manrope,var(--font-body,sans-serif);
  filter: drop-shadow(0 6px 8px #0008);
}
.totw-card::before,.totw-card::after { content: none; }
.totw-card-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.totw-card-heading {
  position: absolute; z-index: 3; inset: 11px 10px auto 11px;
  display: flex; align-items: center; justify-content: space-between; gap: 2px;
  white-space: nowrap;
}
.totw-card-series,.totw-card-edition { position: static; font: 850 5.7px/1.2 Manrope,sans-serif; letter-spacing: .07em; color: var(--weekly-ink); }
.totw-card-edition { color: var(--weekly-muted); padding: 3px 4px; border: 1px solid #c0ebac55; border-radius: 3px; }
.totw-card-rating {
  inset: 49px auto auto 10px; z-index: 3;
  width: 46px; height: 46px; display: grid; place-items: center;
  isolation: isolate; color: var(--weekly-ink);
}
.totw-card-rating b {
  position: relative; z-index: 2; display: block;
  font: 900 29px/1 var(--font-card-display);
  translate: 0 var(--rating-baseline-shift);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px #060d18,0 2px #060d18,0 3px 4px #0009,0 0 7px color-mix(in srgb,var(--orbit-ink) 55%,transparent);
}
.totw-card-team { inset: 103px auto auto 10px; z-index: 3; width: 46px; height: 46px; display: grid; place-items: center; }
.totw-card-team img { width: 100%; height: 100%; max-width: none; object-fit: contain; filter: drop-shadow(0 2px 4px #000b); }
.totw-card-role {
  position: absolute; inset: 150px auto auto 7px; z-index: 3;
  width: 52px; height: 15px; display: grid; place-items: center;
  color: var(--weekly-muted); text-align: center; text-transform: uppercase;
  overflow-wrap: anywhere; font: 850 6.7px/1.15 Manrope,sans-serif;
}
.totw-card:not(:has(.totw-card-team)) .totw-card-role { top: 99px; }
.totw-card-portrait {
  inset: 28px 0 auto 59px; height: 180px;
  border-radius: 0; background: none;
  mask-image: linear-gradient(#000 58%,transparent),linear-gradient(90deg,transparent,#000 20%);
  mask-composite: intersect;
}
.totw-card-portrait img { object-position: 56% 35%; filter: saturate(.73) contrast(1.08); }
.totw-card-portrait > span { color: var(--weekly-muted); }
.totw-card-name,.weekly-player .totw-card-name {
  inset: 199px 10px auto 11px; z-index: 3;
  height: 29px; max-height: 29px; display: grid; place-items: center start;
  font: 900 23px/.98 var(--font-card-display); letter-spacing: -.035em;
  color: var(--weekly-ink); text-align: left; text-shadow: 0 1px #030911,0 2px 3px #000a;
}
.totw-card-name > span { min-width: 0; overflow-wrap: anywhere; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.totw-card-name[data-long-name=true],.weekly-player .totw-card-name[data-long-name=true] { font-size: 13px; }
.totw-card-stats { position: absolute; inset: 233px 15px auto; height: 28px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.totw-card-stats > span { display: grid; place-items: center; align-content: center; gap: 2px; min-width: 0; }
.totw-card-stats > span + span { border-left: 1px solid #bddbee44; }
.totw-card-stats small { font: 800 7px/1 Manrope,sans-serif; color: var(--weekly-muted); white-space: nowrap; }
.totw-card-stats b { font: 900 17px/1 var(--font-card-display); text-shadow: 0 1px #030911; font-variant-numeric: tabular-nums; }
.totw-card-stats b.totw-stat-long { font-size: 12px; }
.totw-collection { background: linear-gradient(135deg,#172522,#0e1918); border-color: #8299a24a; }
.totw-collection header p,.totw-collection header > span { color: #abd2b7; }

.totw-card--monthly {
  --weekly-ink: #f2faff;
  --weekly-muted: #b9e8ff;
  --orbit-ink: #54c3ff;
  --orbit-core: #d5f9ff;
  --orbit-time: 3.5s;
  border-radius: 0;
  clip-path: polygon(0 0,89% 0,100% 7.7%,100% 100%,11% 100%,0 92.3%);
  filter: drop-shadow(0 6px 9px #003d9e80);
}
.totw-card--monthly .totw-card-edition { border-color: transparent; }
.totw-card--monthly .totw-card-portrait {
  clip-path: polygon(14% 0,100% 0,100% 82%,70% 100%,0 100%,0 22%);
  background: #174cbb;
  mask-image: linear-gradient(#000 65%,transparent);
}
.totw-card--monthly .totw-card-portrait img { filter: grayscale(1) contrast(1.14); mix-blend-mode: luminosity; }
.totw-card--monthly .totw-card-portrait::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(118deg,transparent 65%,#a7edff76 65.4% 66%,transparent 66.4%);
}
.totw-card--monthly .totw-card-name {
  border-left: 2px solid #a3e2ff; padding-left: 6px;
  background: linear-gradient(90deg,#091d62,#112767df 72%,#102a7155);
}
.weekly-arena--monthly { background: linear-gradient(135deg,#102447,#090f23); border-color: #3c7bd456; }
.weekly-arena--monthly .weekly-field:has(.totw-card) {
  background: radial-gradient(ellipse at var(--lx,50%) var(--ly,30%),#3183ff2b,transparent 72%),repeating-linear-gradient(0deg,#132954 0,#132954 10%,#162e5b 10%,#162e5b 20%);
  box-shadow: 0 5px 0 #060e22,0 6px 0 #4a74b678,0 12px 22px #0007,inset 0 0 55px #060e2b99;
}
.weekly-arena--monthly .weekly-field-markings,
.weekly-arena--monthly .weekly-field-markings i { border-color: #a3cfff55; }
#monthly-view .weekly-week-picker { background: linear-gradient(135deg,#152d54,#0c172f); border-color: #448fe04d; }
#monthly-view .weekly-week-picker > button,
#monthly-view .weekly-week-current > span,
#monthly-view .weekly-week-current > strong { color: #c5eaff; }
#player-totm-collection { background: linear-gradient(135deg,#132648,#0b152b); border-color: #467bd453; }
#player-totm-collection header p,#player-totm-collection header > span { color: #a1d4ff; }
