:root {
  color-scheme: dark;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --bg: #090a0a;
  --surface: #121413;
  --surface-2: #181b19;
  --surface-3: #202421;
  --line: #2b302d;
  --line-strong: #424944;
  --text: #f7f7f3;
  --muted: #929993;
  --green: #64e1aa;
  --green-dark: #103c2b;
  --gold: #f0bd4d;
  --red: #f06a64;
  --blue: #79afe6;
}

* { box-sizing: border-box; }

html {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0;
}

button, input { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }

.site-header {
  width: 100%;
  min-height: 64px;
  padding: 0 max(18px, calc((100vw - 1160px) / 2));
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid #222522;
  background: rgba(9, 10, 10, .94);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
}

.brand strong { font-size: 19px; }

.dqd-app-logo {
  width: 34px;
  height: 34px;
  margin-left: auto;
  display: block;
  flex: 0 0 auto;
  border-radius: 5px;
  object-fit: cover;
}

#app { width: 100%; max-width: 100%; min-height: calc(100dvh - 64px); overflow-x: hidden; }

.intro-screen {
  width: min(1100px, calc(100% - 36px));
  min-height: calc(100dvh - 64px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: 58px;
  padding: 54px 0 72px;
}

.intro-art {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  filter: saturate(1.18) contrast(1.06) brightness(1.03);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.intro-copy h1 {
  max-width: 560px;
  margin: 0;
  font-size: clamp(36px, 5vw, 66px);
  line-height: 1.02;
}

.intro-lead {
  max-width: 610px;
  margin: 20px 0 0;
  color: #b4bbb5;
  font-size: 15px;
  line-height: 1.75;
}

.intro-actions { margin-top: 28px; }

.intro-pace-selector {
  width: 100%;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(18, 20, 19, .9);
}

.intro-pace-button {
  min-width: 0;
  min-height: 62px;
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #aab2ac;
  text-align: left;
  transition: background .14s ease, border-color .14s ease, color .14s ease, transform .14s ease;
}

.intro-pace-button strong { font-size: 13px; }
.intro-pace-button small { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.intro-pace-button:hover { background: #181c19; color: var(--text); }
.intro-pace-button:active { transform: scale(.98); }
.intro-pace-button.active { border-color: #4f6659; background: #202a24; color: var(--text); box-shadow: inset 3px 0 0 var(--green); }
.intro-pace-button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.identity-scroll-hint { display: none; }

.primary-button, .secondary-button {
  min-height: 50px;
  border-radius: 7px;
  padding: 0 20px;
  font-weight: 850;
  transition: transform .14s ease, background .14s ease, border-color .14s ease, opacity .14s ease;
}

.primary-button {
  border: 1px solid var(--text);
  background: var(--text);
  color: #0b0c0b;
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
}

.primary-button:hover { background: #dfe5df; }
.secondary-button:hover { border-color: #737c76; background: #141715; }
.primary-button:active, .secondary-button:active { transform: scale(.98); }
.primary-button:disabled, .secondary-button:disabled { opacity: .38; cursor: not-allowed; }
.intro-start { width: 100%; margin-top: 12px; }

.identity-screen, .career-screen, .retired-screen {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
  padding: 38px 0 80px;
  position: relative;
  isolation: isolate;
}

.screen-backdrop {
  position: fixed;
  z-index: -2;
  inset: 64px 0 0;
  width: 100%;
  height: calc(100dvh - 64px);
  object-fit: cover;
  object-position: center;
  opacity: .64;
  filter: saturate(1.18) contrast(1.05) brightness(1.03);
  pointer-events: none;
  user-select: none;
}

.identity-screen::before, .career-screen::before, .retired-screen::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 64px 0 0;
  pointer-events: none;
}

.identity-screen::before {
  background: linear-gradient(180deg, rgba(9,10,10,.3), rgba(9,10,10,.52) 62%, rgba(9,10,10,.82));
}

.identity-backdrop { filter: saturate(1.18) contrast(1.05) brightness(1.06); }
.career-backdrop { opacity: .74; object-position: center 42%; filter: saturate(1.42) contrast(1.08) brightness(1.07); }
.career-screen::before {
  background: linear-gradient(180deg, rgba(9,10,10,.22), rgba(9,10,10,.42) 52%, rgba(9,10,10,.68));
}

.retired-backdrop { opacity: .82; object-position: center 58%; filter: saturate(1.28) contrast(1.05) brightness(1.1); }
.retired-screen::before {
  background:
    radial-gradient(circle at 50% 34%, rgba(9,10,10,.04), rgba(9,10,10,.56) 68%),
    linear-gradient(180deg, rgba(9,10,10,.08), rgba(9,10,10,.68) 88%);
}

.screen-heading { margin-bottom: 28px; }
.screen-heading h1 { margin: 0; font-size: 34px; }
.screen-heading p { margin: 9px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.identity-layout {
  display: grid;
  grid-template-columns: minmax(230px, .8fr) minmax(300px, 1.1fr) minmax(300px, 1fr);
  gap: 14px;
}

.identity-column { min-width: 0; }
.identity-column h2 { margin: 0 0 12px; font-size: 13px; }

.kit-stage {
  min-height: 280px;
  padding: 24px 18px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: radial-gradient(circle at 50% 34%, #233129, #101210 66%);
}

.kit {
  width: 176px;
  height: 166px;
  position: relative;
  display: grid;
  place-items: center;
  clip-path: polygon(21% 0, 37% 0, 43% 8%, 57% 8%, 63% 0, 79% 0, 100% 22%, 86% 42%, 76% 34%, 76% 100%, 24% 100%, 24% 34%, 14% 42%, 0 22%);
  background: #f3f3ef;
  color: #101210;
  box-shadow: inset 0 -20px 30px rgba(0,0,0,.12);
}

.kit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 34%, rgba(0,0,0,.08) 35%, transparent 47%);
}

.kit-copy { position: relative; z-index: 1; text-align: center; }
.kit-name { min-height: 14px; display: block; max-width: 118px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: 900; text-transform: uppercase; white-space: nowrap; }
.kit-number { display: block; margin-top: 2px; font-size: 58px; line-height: 1; font-weight: 950; }
.kit-meta { margin-top: 15px; color: var(--muted); font-size: 11px; }

.form-grid { display: grid; grid-template-columns: 1fr 92px; gap: 10px; }
.field { margin-bottom: 16px; }
.field label, .field-label { display: block; margin-bottom: 8px; color: #cbd0cc; font-size: 11px; font-weight: 800; }
.text-input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  outline: none;
  background: var(--surface);
  color: var(--text);
}
.text-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(100,225,170,.12); }

.bridge-profile-card {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 5px 9px;
  display: flex;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.bridge-profile-card.is-ready { border-color: rgba(100,225,170,.42); background: rgba(25,50,38,.88); }
.bridge-profile-card.is-ready { cursor: default; }
.bridge-profile-card:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.bridge-profile-avatar {
  width: 34px;
  height: 34px;
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  background: #243029;
  color: #d8e5dc;
  font-size: 10px;
}
.bridge-profile-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bridge-profile-copy { min-width: 0; display: block; }
.bridge-profile-copy strong, .bridge-profile-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bridge-profile-copy strong { color: var(--text); font-size: 12px; }
.bridge-profile-copy small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.bridge-profile-card.is-ready .bridge-profile-copy small { color: #8bdcb3; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.segment-button, .nation-button, .position-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  transition: transform .13s ease, border-color .13s ease, background .13s ease, color .13s ease;
}
.segment-button:hover, .nation-button:hover, .position-button:hover { border-color: var(--line-strong); color: var(--text); }
.segment-button:active, .nation-button:active, .position-button:active { transform: scale(.97); }
.segment-button.active, .nation-button.active, .position-button.active { background: #e8ece8; border-color: #e8ece8; color: #0d0f0e; }

.image-mark { position: relative; isolation: isolate; overflow: hidden; }
.image-mark-fallback { position: absolute; z-index: 0; inset: 0; display: grid; place-items: center; visibility: hidden; }
.image-mark.image-error .image-mark-fallback { visibility: visible; }
.image-mark img { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.image-mark img[hidden] { display: none; }
.country-flag { width: 32px; aspect-ratio: 4 / 3; flex: 0 0 auto; display: grid; border: 1px solid rgba(255,255,255,.25); border-radius: 2px; background: #202522; color: #cfd6d1; font-size: 7px; font-weight: 900; box-shadow: 0 2px 7px rgba(0,0,0,.2); }
.country-flag img { object-fit: cover; }

.country-selector { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #0e100f; }
.country-selected { min-height: 52px; padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); background: #151916; }
.country-selected-identity { min-width: 0; display: flex; align-items: center; gap: 10px; }
.country-selected small { display: block; margin-bottom: 3px; color: var(--muted); font-size: 8px; }
.country-selected strong { display: block; font-size: 13px; }
.country-selected b { min-width: 38px; padding: 5px 6px; border: 1px solid #37604c; border-radius: 4px; color: var(--green); font-size: 9px; text-align: center; }
.country-search-wrap { position: relative; padding: 9px; border-bottom: 1px solid var(--line); }
.country-search { height: 40px; padding-right: 58px; }
.country-count { position: absolute; top: 50%; right: 20px; transform: translateY(-50%); color: var(--muted); font-size: 9px; pointer-events: none; }
.country-list { max-height: 310px; padding: 7px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #48504a #171a18; scrollbar-width: thin; }
.nation-button { min-width: 0; padding: 0 9px; display: flex; align-items: center; text-align: left; }
.nation-button[hidden] { display: none; }
.nation-button > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.country-list-flag { width: 26px; margin-right: 7px; }
.nation-code { margin-right: 7px; color: var(--green); font-size: 9px; }
.nation-button.active .nation-code { color: #285d45; }
.country-empty { grid-column: 1 / -1; margin: 0; padding: 32px 10px; color: var(--muted); font-size: 11px; text-align: center; }

.position-pitch {
  min-height: 420px;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(7, 1fr);
  align-items: center;
  gap: 6px;
  border: 1px solid #74ba9d;
  border-radius: 8px;
  background:
    linear-gradient(to bottom, transparent 49.4%, rgba(225,255,241,.55) 49.5%, rgba(225,255,241,.55) 50.5%, transparent 50.6%),
    radial-gradient(circle at 50% 50%, transparent 0 39px, rgba(225,255,241,.42) 40px 41px, transparent 42px),
    repeating-linear-gradient(90deg, #0f4f37 0 33.33%, #125940 33.33% 66.66%);
}
.position-button { min-height: 40px; padding: 4px 2px; background: rgba(6,31,21,.78); color: #d8eee3; border-color: rgba(209,244,226,.12); line-height: 1.15; }
.position-button span { display: block; font-size: 10px; }
.position-button small { display: block; margin-top: 3px; color: #86aa98; font-size: 7px; }
.position-button.active { background: var(--text); color: #0d0f0e; }
.position-button.active small { color: #496354; }
.position-button[data-position="ST"] { grid-column: 3; grid-row: 1; }
.position-button[data-position="LW"] { grid-column: 1; grid-row: 2; }
.position-button[data-position="SS"] { grid-column: 3; grid-row: 2; }
.position-button[data-position="RW"] { grid-column: 5; grid-row: 2; }
.position-button[data-position="CAM"] { grid-column: 3; grid-row: 3; }
.position-button[data-position="LM"] { grid-column: 1; grid-row: 4; }
.position-button[data-position="CM"] { grid-column: 3; grid-row: 4; }
.position-button[data-position="RM"] { grid-column: 5; grid-row: 4; }
.position-button[data-position="DM"] { grid-column: 3; grid-row: 5; }
.position-button[data-position="LB"] { grid-column: 1; grid-row: 6; }
.position-button[data-position="CB"] { grid-column: 3; grid-row: 6; }
.position-button[data-position="RB"] { grid-column: 5; grid-row: 6; }
.position-button[data-position="GK"] { grid-column: 3; grid-row: 7; }

.identity-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.identity-actions button { min-width: 150px; }

.player-banner {
  display: grid;
  grid-template-columns: 78px minmax(180px, 1fr) repeat(5, minmax(72px, 84px));
  align-items: center;
  gap: 14px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.ovr-block { width: 78px; height: 78px; display: grid; place-items: center; border: 1px solid var(--green); border-radius: 50%; }
.ovr-block strong { display: block; font-size: 32px; line-height: 1; text-align: center; }

.player-identity { min-width: 0; }
.player-identity h1 { margin: 0; overflow: hidden; text-overflow: ellipsis; font-size: 25px; white-space: nowrap; }
.player-identity p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.player-meta { min-width: 0; display: flex; align-items: center; gap: 7px; }
.player-meta > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-flag { width: 24px; }
.club-line { min-width: 0; display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.club-mark { width: 30px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border: 0; background: transparent; color: white; font-size: 9px; font-weight: 950; }
.club-mark .image-mark-fallback { border: 2px solid rgba(255,255,255,.8); background: var(--club-color, #343a36); }
.club-line strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 12px; white-space: nowrap; }

.career-stat { min-width: 0; height: 58px; padding-left: 12px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; border-left: 1px solid var(--line); }
.career-stat span { width: 100%; display: block; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.career-stat strong { width: 100%; max-height: 2.3em; display: block; margin-top: 5px; overflow: hidden; font-size: 14px; line-height: 1.15; overflow-wrap: anywhere; }

.career-screen .player-banner { grid-template-columns: 78px minmax(180px, 1fr) minmax(430px, 520px); padding-bottom: 18px; }
.career-stats {
  min-width: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(122, 139, 128, .42);
  border-radius: 7px;
  background: rgba(11, 15, 13, .92);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .2), inset 0 1px rgba(255, 255, 255, .035);
}
.career-screen .career-stat {
  position: relative;
  height: 76px;
  padding: 12px 7px 15px;
  justify-content: flex-start;
  align-items: center;
  border-left: 1px solid rgba(122, 139, 128, .25);
  background: linear-gradient(180deg, rgba(33, 40, 36, .9), rgba(18, 23, 20, .94));
  text-align: center;
}
.career-screen .career-stat:first-child { border-left: 0; }
.career-screen .career-stat::after { content: ""; position: absolute; inset: auto 7px 6px; height: 3px; border-radius: 2px; background: #5ed3a0; }
.career-screen .career-stat:nth-child(2)::after { background: #e0b458; }
.career-screen .career-stat:nth-child(3)::after { background: #6da9d8; }
.career-screen .career-stat:nth-child(4)::after { background: #e47c6d; }
.career-screen .career-stat:nth-child(5)::after { background: #69c2b9; }
.career-screen .career-stat span {
  height: 14px;
  color: #b5beb7;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}
.career-screen .career-stat strong {
  min-height: 32px;
  max-height: none;
  margin-top: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f7faf8;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-weight: 850;
  line-height: 1.05;
  text-align: center;
}
.career-screen .career-stat:nth-child(2) strong { font-size: 15px; }

.trophy-strip { min-height: 64px; padding: 14px 0; display: flex; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); }
.trophy-cabinet-trigger { min-width: 0; flex: 1; padding: 0; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.trophy-cabinet-trigger:hover .trophy-label { color: #f1d98f; }
.trophy-cabinet-trigger:active { transform: scale(.992); }
.trophy-label { flex: 0 0 auto; margin-right: 5px; color: #d7c58c; font-size: 11px; font-weight: 900; }
.trophy-list { min-width: 0; flex: 1; display: flex; align-items: center; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.trophy-list::-webkit-scrollbar { display: none; }
.trophy-chip { flex: 0 0 auto; display: inline-flex; align-items: baseline; gap: 4px; padding: 7px 10px; border: 1px solid #856a2d; border-radius: 5px; background: rgba(45,36,15,.72); color: #ffd66e; font-size: 13px; font-weight: 850; box-shadow: inset 0 1px rgba(255,255,255,.04); }
.trophy-chip strong { color: #fff0bd; font-size: 12px; }
.trophy-chip.individual-award { border-color: #a9842f; background: #201b0e; color: #ffd66e; }
.empty-trophy { color: #626863; font-size: 11px; }
.retire-career-button { min-height: 34px; margin-left: auto; flex: 0 0 auto; border: 1px solid #6b3432; border-radius: 6px; padding: 0 11px; background: #261514; color: #ff9e99; font-size: 10px; font-weight: 850; transition: transform .14s ease, border-color .14s ease, background .14s ease; }
.retire-career-button:hover { border-color: #a74a46; background: #321817; }
.retire-career-button:active { transform: scale(.96); }

.career-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .8fr); gap: 34px; padding-top: 28px; }
.decision-section h2, .timeline-section h2 { margin: 0; font-size: 23px; }
.decision-section > p { margin: 9px 0 0; max-width: 680px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.decision-kicker { display: inline-flex; align-items: center; min-height: 24px; margin-bottom: 12px; padding: 0 7px; border: 1px solid #345c49; border-radius: 5px; color: var(--green); font-size: 9px; font-weight: 900; }

.decision-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 20px; }
.decision-card {
  min-height: 190px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: center;
  transition: transform .14s ease, border-color .14s ease, background .14s ease, opacity .14s ease;
}
.decision-card:hover { transform: translateY(-3px); border-color: #56615a; background: #171a18; }
.decision-card:active { transform: translateY(0) scale(.975); }
.decision-card.selected { border-color: var(--green); background: rgba(100,225,170,.08); transform: scale(.98); }
.decision-card:disabled { opacity: .52; cursor: wait; }
.decision-card small { color: var(--muted); font-size: 9px; }
.decision-card strong { display: block; margin: 8px 0; font-size: 14px; line-height: 1.3; }
.decision-mark { width: 66px; height: 74px; display: grid; place-items: center; border: 3px solid rgba(255,255,255,.82); background: var(--club-color, #2c332f); color: white; font-size: 14px; font-weight: 950; }
.decision-mark.club-crest-mark { padding: 4px; border: 0; background: transparent; }
.decision-mark.club-crest-mark .image-mark-fallback { border: 3px solid rgba(255,255,255,.82); background: var(--club-color, #2c332f); }
.national-decision-mark { grid-template-rows: 34px auto; gap: 5px; padding: 7px 5px 6px; }
.decision-flag { width: 38px; }
.national-decision-mark > span:last-child { font-size: 9px; line-height: 1; }
.decision-effect { min-height: 28px; color: #aeb6b0; font-size: 10px; line-height: 1.45; }
.decision-card.illustrated { min-height: 316px; padding: 10px 10px 16px; justify-content: flex-start; overflow: hidden; background: #111412; }
.decision-card.illustrated:hover { background: #171b18; }
.decision-art {
  width: min(100%, 280px);
  aspect-ratio: 4 / 3;
  flex: 0 0 auto;
  display: block;
  border: 1px solid #46554d;
  border-bottom-color: var(--decision-accent);
  border-radius: 6px;
  background: #202522;
  box-shadow: 0 9px 22px rgba(0,0,0,.28);
}
.decision-art > img { object-fit: cover; transition: transform .22s ease, filter .22s ease; }
.decision-card.illustrated:hover .decision-art > img { transform: scale(1.035); filter: saturate(1.12) contrast(1.03); }
.decision-art-shade { position: absolute; z-index: 2; inset: 46% 0 0; background: linear-gradient(0deg, rgba(6,8,7,.94), rgba(6,8,7,.68) 46%, transparent); }
.decision-art-label { position: absolute; z-index: 3; left: 10px; right: 10px; bottom: 9px; min-width: 0; display: flex; align-items: center; gap: 7px; color: #fff; font-size: 12px; font-weight: 950; line-height: 1.1; text-shadow: 0 2px 7px #000; }
.decision-art-label > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.decision-art-flag { width: 25px; border-color: rgba(255,255,255,.5); }
.decision-art > .image-mark-fallback { z-index: 4; border: 2px solid var(--decision-accent); background: #222824; color: #fff; font-size: 14px; font-weight: 950; }
.decision-art.image-error .decision-art-shade, .decision-art.image-error .decision-art-label { display: none; }
.decision-card.illustrated .decision-copy { width: 100%; margin-top: 13px; }
.decision-card.illustrated .decision-copy small { color: #a7aea9; }
.decision-card.illustrated .decision-copy strong { margin: 6px 0 0; font-size: 15px; }
.decision-card.illustrated .decision-effect { width: 100%; min-height: 0; margin-top: auto; padding: 11px 5px 0; }

.outcome-banner {
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  border: 1px solid #587162;
  border-radius: 7px;
  background: linear-gradient(105deg, #18221c 0%, #121714 68%);
  box-shadow: 0 12px 28px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.035);
  animation: outcome-in .42s cubic-bezier(.2,.9,.25,1.15) both;
}
.outcome-banner::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--green); }
.outcome-label { min-width: 74px; padding: 6px 8px; border: 1px solid #527261; border-radius: 5px; color: var(--green); font-size: 9px; font-weight: 900; text-align: center; }
.outcome-banner strong { display: block; color: #f4f7f5; font-size: 17px; line-height: 1.3; }
.outcome-banner p { margin: 6px 0 0; color: #c3cbc5; font-size: 13px; line-height: 1.55; }
.outcome-banner.outcome-world-cup { border-color: #7f6b39; background: linear-gradient(105deg, #262111 0%, #151713 70%); }
.outcome-banner.outcome-world-cup::before { background: var(--gold); }
.outcome-banner.outcome-world-cup .outcome-label { border-color: #806b35; color: var(--gold); }

.timeline-section { min-width: 0; }
.timeline-summary { margin: 9px 0 17px; color: var(--muted); font-size: 11px; }
.timeline-list { max-height: 500px; overflow-y: auto; padding-right: 6px; }
.timeline-row { display: grid; grid-template-columns: 44px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.timeline-age { color: var(--green); font-size: 11px; font-weight: 900; }
.timeline-row strong { display: block; font-size: 11px; line-height: 1.4; }
.timeline-row p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.timeline-trophies { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 5px; }
.timeline-trophies span { display: inline-flex; align-items: baseline; gap: 3px; padding: 4px 6px; border: 1px solid #785f29; border-radius: 4px; background: rgba(45,35,13,.72); color: #ffd66e; font-size: 10px; font-weight: 900; line-height: 1; }
.timeline-trophies strong { color: #fff0bd; font-size: 9px; }
.timeline-trophies span.individual-award { border-color: #c69a35; background: #31250b; color: #fff0ae; box-shadow: inset 0 0 0 1px rgba(255,229,145,.08); }

.national-strip { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.national-strip h3 { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; font-size: 12px; }
.national-strip-flag { width: 28px; }
.national-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 7px; }
.national-stats div { padding: 12px 7px; text-align: center; border-right: 1px solid var(--line); }
.national-stats div:last-child { border-right: 0; }
.national-stats strong { display: block; font-size: 15px; }
.national-stats span { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.world-cup-summary { padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-top: 0; }
.world-cup-summary span { color: var(--muted); font-size: 9px; }
.world-cup-summary strong { min-width: 0; color: var(--gold); font-size: 11px; text-align: right; overflow-wrap: anywhere; }

.retired-screen {
  max-width: 840px;
  height: calc(100dvh - 64px);
  min-height: 620px;
  padding: 24px 0 20px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto auto;
  align-content: center;
  gap: 10px;
  overflow: hidden;
  text-align: center;
}
.retired-hero { min-height: 0; padding: 20px 0 18px; overflow: hidden; border-bottom: 1px solid var(--line); }
.retired-hero h1 { margin: 0; font-size: 48px; }
.retired-hero p { max-width: 560px; margin: 10px auto 0; color: var(--muted); line-height: 1.6; }
.retirement-reason { width: min(100%, 640px); margin: 16px auto 0; padding: 15px; border: 1px solid #513631; border-radius: 8px; background: #171211; text-align: left; }
.retirement-reason span { color: var(--red); font-size: 9px; font-weight: 900; }
.retirement-reason h2 { margin: 8px 0 0; font-size: 19px; }
.retirement-reason p { margin: 9px 0 0; font-size: 12px; }
.legacy-rating { margin: 14px auto 0; display: grid; justify-items: center; gap: 6px; }
.legacy-stars { min-width: 232px; display: grid; grid-template-columns: repeat(5, 40px); justify-content: center; gap: 6px; }
.legacy-star { width: 40px; height: 40px; display: grid; place-items: center; color: #353a36; font-size: 38px; line-height: 1; filter: grayscale(1); }
.legacy-star.active { color: #f4c75e; filter: none; text-shadow: 0 4px 18px rgba(240,189,77,.28); }
.legacy-rating > span { color: var(--muted); font-size: 11px; }
.retired-screen .player-banner { grid-template-columns: repeat(6, 1fr); margin-top: 0; }
.retired-screen .career-stat { border-left: 0; padding: 13px 4px; background: var(--surface); }
.restart-button { width: min(100%, 360px); margin: 0 auto; }

.modal-backdrop { position: fixed; z-index: 80; inset: 0; padding: 20px; display: grid; place-items: center; background: rgba(0,0,0,.76); backdrop-filter: blur(5px); }
.retirement-dialog { width: min(100%, 440px); padding: 22px; border: 1px solid #4f3431; border-radius: 8px; background: #111311; box-shadow: 0 24px 70px rgba(0,0,0,.5); }
.retirement-dialog h2 { margin: 0; font-size: 26px; }
.retirement-dialog p { margin: 11px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.dialog-actions { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

.trophy-celebration-overlay { position: fixed; z-index: 110; inset: 0; padding: 18px; display: grid; place-items: center; overflow-y: auto; background: rgba(3,5,4,.74); backdrop-filter: blur(6px); animation: trophy-celebration-in .28s ease both; }
.trophy-celebration-panel { position: relative; width: min(100%, 540px); max-height: calc(100dvh - 36px); overflow: hidden; border: 1px solid #8d7135; border-radius: 8px; background: #111411; box-shadow: 0 24px 70px rgba(0,0,0,.58), inset 0 1px rgba(255,255,255,.05); }
.trophy-celebration-panel.is-award-moment { width: min(100%, 560px); display: grid; grid-template-columns: 190px minmax(0, 1fr); }
.trophy-celebration-panel::before { content: ""; position: absolute; z-index: 4; inset: 0 0 auto; height: 3px; background: var(--gold); }
.trophy-celebration-close { position: absolute; z-index: 6; top: 11px; right: 11px; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; background: rgba(5,7,6,.72); color: white; font-size: 20px; line-height: 1; }
.trophy-celebration-close:hover { background: rgba(255,255,255,.1); }
.trophy-celebration-visual { position: relative; min-height: 282px; overflow: hidden; background: #121511; }
.trophy-celebration-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7,8,7,.88), rgba(7,8,7,.04) 68%), linear-gradient(90deg, transparent 55%, rgba(17,20,17,.7)); }
.trophy-celebration-panel.is-ballon-dor .trophy-celebration-visual::after { background: linear-gradient(0deg, rgba(18,13,3,.9), rgba(18,13,3,.02) 72%), linear-gradient(90deg, transparent 55%, rgba(17,20,17,.72)); }
.trophy-celebration-visual img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: center; filter: saturate(1.18) contrast(1.06); }
.trophy-celebration-panel.is-ballon-dor .trophy-celebration-visual img { object-position: 57% center; filter: sepia(.18) saturate(1.35) contrast(1.06); }
.trophy-celebration-emblem { position: absolute; z-index: 2; left: 14px; bottom: 14px; width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid rgba(255,221,126,.82); border-radius: 50%; background: rgba(28,21,5,.74); color: #ffe09a; font-size: 11px; font-weight: 950; box-shadow: 0 8px 24px rgba(0,0,0,.34), inset 0 0 0 4px rgba(255,224,139,.08); }
.trophy-celebration-content { min-width: 0; padding: 24px 22px 20px; overflow-y: auto; }
.trophy-celebration-panel.is-cabinet .trophy-celebration-content { max-height: calc(100dvh - 36px); }
.trophy-celebration-kicker { display: block; padding-right: 36px; color: var(--gold); font-size: 9px; font-weight: 900; }
.trophy-celebration-panel h2 { margin: 8px 34px 0 0; color: #fff4cf; font-size: 24px; line-height: 1.2; overflow-wrap: anywhere; }
.trophy-celebration-copy { margin: 9px 0 0; color: #aeb6b0; font-size: 11px; line-height: 1.55; }
.trophy-celebration-new { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 7px; }
.trophy-celebration-new span { display: inline-flex; align-items: baseline; gap: 4px; padding: 7px 9px; border: 1px solid #a98535; border-radius: 5px; background: #34290f; color: #ffd66e; font-size: 14px; font-weight: 900; }
.trophy-celebration-new span.individual-award { border-color: #d0a443; background: #4a370c; color: #fff0a8; }
.trophy-celebration-new strong { color: #fff2c7; font-size: 12px; }
.trophy-moment-total { margin-top: 18px; padding-top: 13px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.12); }
.trophy-moment-total span { color: #89918b; font-size: 9px; font-weight: 850; }
.trophy-moment-total strong { color: #fff0bd; font-size: 18px; }
.trophy-cabinet-heading { margin-top: 20px; padding-top: 15px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.12); }
.trophy-cabinet-heading span { color: #aeb6b0; font-size: 10px; font-weight: 850; }
.trophy-cabinet-heading strong { color: #fff0bd; font-size: 19px; }
.trophy-cabinet-grid { margin-top: 11px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.trophy-cabinet-item { min-width: 0; padding: 9px 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border: 1px solid #50482e; border-radius: 6px; background: rgba(10,13,10,.7); }
.trophy-cabinet-item span { min-width: 0; color: #e6ddc0; font-size: 12px; font-weight: 800; overflow-wrap: anywhere; }
.trophy-cabinet-item strong { flex: 0 0 auto; color: var(--gold); font-size: 15px; }
.trophy-cabinet-item.individual-award { border-color: #8b6c2c; background: rgba(44,34,12,.62); }
.trophy-cabinet-empty { grid-column: 1 / -1; margin: 0; padding: 22px; border: 1px solid #414740; color: var(--muted); text-align: center; }
.danger-button { min-height: 50px; border: 1px solid #9d4541; border-radius: 7px; background: #8b322e; color: white; padding: 0 18px; font-weight: 850; transition: transform .14s ease, background .14s ease; }
.danger-button:hover { background: #a23a35; }
.danger-button:active { transform: scale(.98); }

.star-encounter-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  padding: 24px;
  display: grid;
  place-items: center;
  overflow-y: auto;
  background: rgba(5, 7, 6, .94);
  backdrop-filter: blur(12px);
  cursor: pointer;
  touch-action: manipulation;
  animation: star-encounter-in .32s ease both;
}
.star-encounter-panel {
  position: relative;
  width: min(1120px, calc((100dvh - 48px) * 1.5), 100%);
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--star-color) 72%, #fff 10%);
  border-radius: 6px;
  background: #080a09;
  box-shadow: 0 28px 90px rgba(0,0,0,.62);
  isolation: isolate;
}
.star-encounter-panel::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4,6,5,.96) 0%, rgba(4,6,5,.86) 30%, rgba(4,6,5,.28) 65%, rgba(4,6,5,.06) 100%),
    linear-gradient(0deg, rgba(4,6,5,.84) 0%, transparent 48%);
  pointer-events: none;
}
.star-encounter-media { position: absolute; z-index: 0; inset: 0; overflow: hidden; background: #080a09; }
.star-encounter-visual { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.star-encounter-close {
  position: absolute;
  z-index: 3;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 50%;
  background: rgba(5,7,6,.66);
  color: #fff;
  font-size: 25px;
  line-height: 1;
  backdrop-filter: blur(8px);
  transition: transform .14s ease, background .14s ease;
}
.star-encounter-close:hover { background: rgba(5,7,6,.9); transform: scale(1.05); }
.star-encounter-close:active { transform: scale(.95); }
.star-encounter-content { position: absolute; z-index: 2; left: 5.5%; bottom: 8%; width: min(var(--star-content-width), 560px); }
.star-encounter-kicker { display: block; color: color-mix(in srgb, var(--star-color) 66%, white 34%); font-size: 11px; font-weight: 900; }
.star-encounter-mark { width: 64px; height: 70px; margin-top: 24px; display: grid; place-items: center; border: 3px solid #f4f4ef; background: var(--star-color); color: white; font-size: 13px; font-weight: 950; }
.star-encounter-mark.club-crest-mark { padding: 5px; border: 0; background: rgba(4,6,5,.52); }
.star-encounter-mark.club-crest-mark .image-mark-fallback { border: 3px solid #f4f4ef; background: var(--star-color); }
.star-encounter-panel h2 { margin: 22px 0 0; font-size: clamp(40px, 5vw, 70px); line-height: 1.02; text-wrap: balance; }
.star-encounter-panel p { max-width: 540px; margin: 18px 0 0; color: #d1d6d2; font-size: 16px; line-height: 1.75; text-shadow: 0 2px 18px rgba(0,0,0,.62); }
.star-encounter-credit { display: block; margin-top: 14px; color: rgba(255,255,255,.62); font-size: 9px; }

.career-settlement-overlay {
  position: fixed;
  z-index: 120;
  inset: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  background: #030504;
  cursor: pointer;
  touch-action: manipulation;
  animation: career-settlement-in .35s ease both;
}
.career-settlement-panel {
  position: relative;
  width: min(100%, 1080px);
  height: 100dvh;
  min-height: 0;
  margin: 0 auto;
  padding: 42px 48px 32px;
  overflow: hidden;
  isolation: isolate;
  background: #070908;
}
.career-settlement-backdrop {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  filter: saturate(.88) contrast(1.08) brightness(.55);
  opacity: .48;
  pointer-events: none;
  user-select: none;
}
.career-settlement-panel::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5,8,6,.22), rgba(7,9,8,.86) 58%, #070908),
    linear-gradient(90deg, rgba(4,7,5,.72), rgba(4,7,5,.35) 48%, rgba(4,7,5,.72));
}
.career-settlement-close {
  position: fixed;
  z-index: 2;
  top: max(16px, env(safe-area-inset-top));
  right: max(20px, calc((100vw - 1040px) / 2));
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  background: rgba(5,7,6,.58);
  color: white;
  font-size: 26px;
  line-height: 1;
  transition: transform .14s ease, background .14s ease;
}
.career-settlement-close:hover { background: rgba(255,255,255,.11); transform: scale(1.05); }
.career-settlement-close:active { transform: scale(.95); }
.career-settlement-content {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  grid-template-areas:
    "profile profile"
    "verdict national"
    "honors clubs"
    "performance clubs";
  align-content: center;
  gap: 12px 18px;
  overflow: hidden;
}
.career-settlement-profile {
  grid-area: profile;
  min-width: 0;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}
.settlement-peak-block {
  width: 88px;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  border: 1px solid color-mix(in srgb, var(--settlement-accent) 76%, #fff 24%);
  border-radius: 7px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--settlement-accent) 68%, #17120a), #18100a 74%);
  box-shadow: inset 0 1px rgba(255,255,255,.16), 0 12px 34px rgba(0,0,0,.28);
  text-align: center;
}
.settlement-peak-block span { color: #f9e4a5; font-size: 9px; font-weight: 900; }
.settlement-peak-block strong { margin-top: 4px; color: #fff6d9; font-size: 40px; line-height: 1; }
.settlement-player-copy { min-width: 0; }
.career-settlement-kicker { display: block; color: var(--settlement-accent); font-size: 10px; font-weight: 900; }
.settlement-player-copy h1 { margin: 5px 0 0; overflow-wrap: anywhere; font-size: 28px; line-height: 1.08; }
.settlement-player-copy p { margin: 7px 0 0; display: flex; align-items: center; gap: 7px; color: #d8ded9; font-size: 10px; font-weight: 800; }
.settlement-player-copy small { margin-top: 5px; display: block; color: #8d9790; font-size: 8px; }
.settlement-player-flag { width: 26px; height: 18px; flex: 0 0 auto; border-radius: 2px; overflow: hidden; }
.settlement-profile-totals { display: grid; grid-template-columns: repeat(2, minmax(74px, 1fr)); gap: 5px; }
.settlement-profile-totals span { padding: 9px 10px; border-left: 1px solid rgba(255,255,255,.14); color: #9ea7a1; font-size: 8px; text-align: right; }
.settlement-profile-totals strong { margin-top: 4px; display: block; color: #f5ce67; font-size: 23px; line-height: 1; }
.career-settlement-verdict {
  grid-area: verdict;
  min-width: 0;
  margin: 0;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--settlement-accent) 58%, #473a1c);
  border-radius: 7px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--settlement-accent) 9%, #14140f), rgba(9,11,9,.92));
  text-align: center;
}
.career-settlement-verdict > span { color: #bda358; font-size: 8px; font-weight: 900; }
.career-settlement-verdict h2 { margin: 5px 0 0; color: #f8d469; font-size: 36px; line-height: 1.05; overflow-wrap: anywhere; }
.career-settlement-verdict strong { margin-top: 6px; display: block; color: #6fdaad; font-size: 11px; }
.career-settlement-verdict p { max-width: 700px; margin: 6px auto 0; color: #b8c0ba; font-size: 9px; line-height: 1.45; }
.career-settlement-national { grid-area: national; min-width: 0; margin: 0; padding: 13px 14px; display: grid; grid-template-columns: minmax(130px, .8fr) minmax(0, 1.2fr); align-items: center; gap: 12px; border-radius: 7px; background: #17191a; }
.career-settlement-national > div { min-width: 0; display: flex; align-items: center; gap: 11px; }
.settlement-national-flag { width: 32px; height: 21px; flex: 0 0 auto; border-radius: 3px; overflow: hidden; }
.career-settlement-national small { display: block; color: #7f8882; font-size: 8px; }
.career-settlement-national strong { margin-top: 2px; display: block; font-size: 11px; overflow-wrap: anywhere; }
.career-settlement-national dl { margin: 0; display: grid; grid-template-columns: 52px 52px minmax(90px, 1fr); }
.career-settlement-national dl div { min-width: 0; padding: 3px 7px; border-left: 1px solid rgba(255,255,255,.1); text-align: center; }
.career-settlement-national dt { color: #7f8882; font-size: 7px; }
.career-settlement-national dd { margin: 4px 0 0; color: #e5ebe7; font-size: 13px; font-weight: 900; overflow-wrap: anywhere; }
.career-settlement-national dl div:last-child dd { color: #65d7a6; font-size: 10px; }
.career-settlement-section { min-width: 0; min-height: 0; margin: 0; overflow: hidden; }
.career-settlement-section-heading { padding-bottom: 6px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; border-bottom: 1px solid rgba(255,255,255,.13); }
.career-settlement-section-heading > div { font-size: 0; line-height: 1; }
.career-settlement-section-heading span { display: block; color: #65716a; font-size: 8px; font-weight: 900; line-height: 1; }
.career-settlement-section-heading h3 { margin: 2px 0 0; font-size: 15px; line-height: 1.1; }
.career-settlement-section-heading > strong { color: #d2b964; font-size: 9px; }
.career-settlement-honors { grid-area: honors; }
.career-settlement-award-grid { margin-top: 8px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.career-settlement-award { min-width: 0; padding: 5px 3px 6px; border: 1px solid rgba(190,155,64,.28); border-radius: 6px; background: rgba(13,15,13,.78); text-align: center; }
.career-settlement-award > div { position: relative; width: 100%; height: 48px; display: grid; place-items: center; }
.career-settlement-award img { width: 92%; height: 92%; object-fit: contain; filter: drop-shadow(0 5px 8px rgba(0,0,0,.42)); }
.career-settlement-award > div span { position: absolute; right: 1px; bottom: 1px; padding: 2px 4px; border: 1px solid #7e5e20; border-radius: 999px; background: #39250a; color: #ffe3a0; font-size: 8px; font-weight: 900; }
.career-settlement-award > strong { min-height: 22px; display: grid; place-items: center; color: #ead99f; font-size: 9px; line-height: 1.25; overflow-wrap: anywhere; }
.career-settlement-empty { margin: 8px 0 0; padding: 12px 8px; border: 1px solid rgba(255,255,255,.1); color: #7f8882; font-size: 9px; text-align: center; }
.career-settlement-performance { grid-area: performance; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 7px; background: #17191a; }
.career-settlement-performance > div { min-width: 0; padding: 9px 8px; border-left: 1px solid rgba(255,255,255,.1); text-align: center; }
.career-settlement-performance > div:first-child { border-left: 0; }
.career-settlement-performance span { display: block; color: #7f8882; font-size: 8px; }
.career-settlement-performance strong { margin-top: 4px; display: block; color: #f1f4f2; font-size: 22px; line-height: 1; }
.career-settlement-clubs { grid-area: clubs; }
.career-settlement-club-grid { margin-top: 8px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-content: start; gap: 7px 6px; }
.career-settlement-club { min-width: 0; min-height: 48px; display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; column-gap: 6px; text-align: left; }
.settlement-club-crest { grid-row: 1 / 3; width: 32px; height: 36px; flex: 0 0 auto; }
.career-settlement-club > strong { width: 100%; color: #e7ece8; font-size: 8px; line-height: 1.25; overflow-wrap: anywhere; }
.career-settlement-club > span { margin-top: 2px; color: #7f8882; font-size: 7px; }

.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 14px);
  width: min(calc(100% - 32px), 440px);
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #202421;
  color: var(--text);
  font-size: 11px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.identity-view-tabs, .career-view-tabs { display: none; }

.identity-screen {
  height: calc(100dvh - 64px);
  min-height: 620px;
  padding: 24px 0 20px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  overflow: hidden;
}
.identity-screen .screen-heading { margin: 0; }
.identity-layout { min-height: 0; height: 100%; }
.identity-kit-column, .identity-details-column, .identity-column.position-column { min-height: 0; display: flex; flex-direction: column; }
.identity-kit-column .kit-stage { min-height: 0; flex: 1; }
.identity-country-panel { min-height: 0; flex: 1; margin-bottom: 0; display: flex; flex-direction: column; }
.identity-country-panel .country-selector { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.identity-country-panel .country-list { min-height: 0; max-height: none; flex: 1; }
.identity-column.position-column .position-pitch { min-height: 0; flex: 1; }
.identity-screen .identity-actions { margin-top: 0; padding-top: 14px; }

.player-banner {
  padding: 16px 18px;
  border: 1px solid rgba(132, 151, 140, .42);
  border-radius: 8px;
  background: rgba(10, 14, 12, .9);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .04);
}
.career-screen .player-banner { padding: 16px 18px; border-bottom: 1px solid rgba(132, 151, 140, .42); }
.ovr-block {
  position: relative;
  width: 70px;
  height: 70px;
  border: 1px solid rgba(100, 225, 170, .78);
  border-radius: 7px;
  background: #10231b;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .035);
}
.ovr-block::before { content: "OVR"; position: absolute; top: 8px; color: #8bb9a4; font-size: 8px; font-weight: 900; }
.ovr-block strong { padding-top: 8px; color: #f3fff8; font-size: 29px; }
.career-stats { border: 0; border-left: 1px solid rgba(132, 151, 140, .28); border-radius: 0; background: transparent; box-shadow: none; }
.career-screen .career-stat { height: 64px; padding: 10px 7px 12px; background: transparent; }
.career-screen .career-stat::after { inset: auto 8px 5px; height: 2px; opacity: .88; }
.career-screen .career-stat span { color: #96a39b; font-size: 9px; }
.career-screen .career-stat strong { min-height: 27px; color: #fff; font-size: 16px; }

.trophy-strip {
  min-height: 48px;
  margin-top: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(132, 151, 140, .28);
  border-radius: 7px;
  background: rgba(10, 14, 12, .78);
}
.trophy-label { color: #f0cf73; }
.retire-career-button { min-height: 32px; background: #2c1717; }

.decision-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(132, 151, 140, .34);
  background: rgba(14, 18, 16, .94);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .22), inset 0 1px rgba(255, 255, 255, .025);
}
.decision-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--decision-accent, var(--green)); opacity: .78; }
.decision-card:hover { border-color: rgba(128, 183, 157, .68); background: #171c19; }
.decision-card.illustrated { background: rgba(14, 18, 16, .96); }
.decision-effect { color: #b9c3bc; }

.screen-enter { animation: screen-enter .25s ease both; }
.identity-screen.screen-enter, .career-screen.screen-enter, .retired-screen.screen-enter { animation-name: backdrop-screen-enter; }
@keyframes screen-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes backdrop-screen-enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes outcome-in {
  0% { opacity: 0; transform: translateY(-14px) scale(.965); }
  70% { opacity: 1; transform: translateY(2px) scale(1.008); }
  100% { opacity: 1; transform: none; }
}
@keyframes trophy-celebration-in { from { opacity: 0; transform: scale(.975); } to { opacity: 1; transform: none; } }
@keyframes star-encounter-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes career-settlement-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes identity-scroll-up { 0%, 100% { transform: translateY(2px); } 50% { transform: translateY(-2px); } }
@keyframes identity-scroll-down { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(2px); } }

@media (min-width: 921px) {
  .career-screen {
    height: calc(100dvh - 64px);
    min-height: 620px;
    padding: 24px 0 20px;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 8px;
    overflow: hidden;
  }
  .career-screen .player-banner, .career-screen .trophy-strip { margin: 0; }
  .career-layout { min-height: 0; height: 100%; padding-top: 12px; }
  .decision-section { min-height: 0; overflow-y: auto; padding-right: 4px; overscroll-behavior: contain; }
  .timeline-section { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  .timeline-list { min-height: 0; max-height: none; flex: 1; }
  .national-strip { margin-top: 12px; padding-top: 12px; }
}

@media (max-width: 920px) {
  .identity-layout { grid-template-columns: 1fr 1fr; }
  .identity-column.position-column { grid-column: 1 / -1; }
  .position-pitch { min-height: 430px; }
  .player-banner { grid-template-columns: 78px minmax(150px, 1fr) repeat(3, minmax(64px, 76px)); }
  .career-stat.optional-stat { display: none; }
  .career-screen .player-banner { grid-template-columns: 78px minmax(0, 1fr); }
  .career-screen .career-stats { grid-column: 1 / -1; }
  .career-screen .career-stat.optional-stat { display: flex; }
  .career-layout { grid-template-columns: 1fr; }
  .timeline-list { max-height: none; }
}

@media (max-width: 680px) {
  .site-header { min-height: 56px; }
  .brand strong { font-size: 17px; }
  .dqd-app-logo { width: 30px; height: 30px; border-radius: 4px; }
  #app { min-height: calc(100dvh - 56px); }
  .intro-screen { width: 100%; min-height: auto; display: flex; flex-direction: column; gap: 0; padding: 0 0 42px; }
  .intro-art { order: 0; width: 100%; aspect-ratio: 1.38 / 1; border: 0; border-radius: 0; }
  .intro-copy { width: 100%; padding: 24px 17px 0; }
  .intro-copy h1 { font-size: 38px; }
  .intro-lead { margin-top: 14px; font-size: 13px; }
  .intro-actions { margin-top: 24px; }
  .identity-scroll-hint {
    position: fixed;
    z-index: 22;
    top: calc(56px + (100dvh - 56px) / 2);
    right: max(5px, env(safe-area-inset-right));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    transform: translateY(-50%);
    color: rgba(247, 247, 243, .76);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-shadow: 0 1px 5px rgba(0, 0, 0, .95);
    pointer-events: none;
    user-select: none;
  }
  .identity-scroll-copy { writing-mode: vertical-rl; text-orientation: upright; }
  .identity-scroll-arrow { font-size: 16px; line-height: 1; }
  .identity-scroll-arrow-up { animation: identity-scroll-up 1.35s ease-in-out infinite; }
  .identity-scroll-arrow-down { animation: identity-scroll-down 1.35s ease-in-out infinite; }
  .identity-screen, .career-screen, .retired-screen { width: calc(100% - 28px); padding-top: 24px; }
  .screen-backdrop { inset: 56px 0 0; height: calc(100dvh - 56px); }
  .identity-screen::before, .career-screen::before, .retired-screen::before { inset: 56px 0 0; }
  .identity-backdrop { object-position: center; opacity: .6; }
  .career-backdrop { object-position: 54% center; opacity: .7; }
  .retired-backdrop { object-position: center 66%; opacity: .76; }
  .screen-heading h1 { font-size: 28px; }
  .identity-layout { display: flex; flex-direction: column; }
  .kit-stage { min-height: 240px; }
  .position-pitch { min-height: 400px; }
  .identity-actions { position: sticky; bottom: 0; z-index: 10; margin-inline: -14px; padding: 12px 14px max(12px, env(safe-area-inset-bottom)); background: rgba(9,10,10,.96); }
  .identity-actions button { min-width: 0; flex: 1; }
  .player-banner { grid-template-columns: 64px minmax(0, 1fr) repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 10px; }
  .career-screen .player-banner { grid-template-columns: 64px minmax(0, 1fr); gap: 10px 8px; padding: 10px 0 14px; }
  .ovr-block { width: 64px; height: 64px; }
  .ovr-block strong { font-size: 24px; }
  .player-identity { grid-column: 2 / -1; }
  .career-stat { height: 58px; padding: 8px 2px 0; border-left: 0; border-top: 1px solid var(--line); text-align: center; }
  .career-stat strong { margin-top: 4px; font-size: 13px; line-height: 1.12; }
  .career-stat.optional-stat { display: block; }
  .career-screen .career-stats { width: 100%; margin-top: 2px; }
  .career-screen .career-stat { height: 72px; padding: 10px 3px 13px; border-top: 0; border-left: 1px solid rgba(122, 139, 128, .25); }
  .career-screen .career-stat:first-child { border-left: 0; }
  .career-screen .career-stat::after { inset: auto 5px 5px; height: 3px; }
  .career-screen .career-stat span { height: 14px; font-size: 10px; line-height: 14px; }
  .career-screen .career-stat strong { min-height: 30px; margin-top: 5px; font-size: 17px; line-height: 1.05; }
  .career-screen .career-stat:nth-child(2) strong { font-size: 15px; }
  .trophy-strip { gap: 7px; }
  .trophy-cabinet-trigger { gap: 7px; }
  .trophy-label { margin-right: 0; font-size: 10px; }
  .trophy-chip { padding: 6px 8px; font-size: 12px; }
  .trophy-chip strong { font-size: 11px; }
  .career-layout { padding-top: 22px; gap: 30px; }
  .decision-section h2, .timeline-section h2 { font-size: 21px; }
  .outcome-banner { grid-template-columns: 1fr; gap: 10px; padding: 14px 15px; }
  .outcome-label { width: max-content; min-width: 0; }
  .outcome-banner strong { font-size: 16px; }
  .outcome-banner p { font-size: 12px; }
  .decision-grid { grid-template-columns: 1fr; }
  .decision-card { min-height: 104px; display: grid; grid-template-columns: 58px 1fr; grid-template-rows: auto auto; gap: 0 12px; padding: 12px; text-align: left; }
  .decision-mark { grid-row: 1 / 3; width: 54px; height: 62px; font-size: 11px; }
  .national-decision-mark { grid-template-rows: 28px auto; gap: 4px; padding: 6px 4px 5px; }
  .decision-flag { width: 32px; }
  .decision-card small { align-self: end; }
  .decision-card strong { margin: 3px 0; }
  .decision-effect { min-height: 0; }
  .decision-card.illustrated { min-height: 122px; grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: auto auto; gap: 0 12px; padding: 10px 11px 10px 10px; overflow: visible; }
  .decision-art { grid-row: 1 / 3; width: 96px; height: 96px; aspect-ratio: auto; align-self: center; }
  .decision-art-label { left: 7px; right: 7px; bottom: 7px; gap: 5px; font-size: 10px; }
  .decision-art-flag { width: 22px; }
  .decision-card.illustrated .decision-copy { grid-column: 2; align-self: end; margin-top: 0; }
  .decision-card.illustrated .decision-copy strong { margin: 4px 0 0; font-size: 14px; }
  .decision-card.illustrated .decision-effect { grid-column: 2; align-self: start; margin-top: 0; padding: 7px 0 0; }
  .trophy-list { overscroll-behavior-x: contain; }
  .retire-career-button { position: sticky; right: 0; }
  .retired-hero h1 { font-size: 38px; }
  .legacy-rating { margin-top: 24px; }
  .legacy-stars { min-width: 190px; grid-template-columns: repeat(5, 32px); gap: 6px; }
  .legacy-star { width: 32px; height: 32px; font-size: 30px; }
  .retired-screen .player-banner { grid-template-columns: repeat(3, 1fr); }
  .dialog-actions { grid-template-columns: 1fr; }
  .trophy-celebration-overlay { padding: 12px; }
  .trophy-celebration-panel { width: min(100%, 380px); max-height: calc(100dvh - 24px); }
  .trophy-celebration-panel.is-award-moment { width: min(100%, 360px); grid-template-columns: 1fr; }
  .trophy-celebration-visual { min-height: 0; height: 126px; }
  .trophy-celebration-visual::after, .trophy-celebration-panel.is-ballon-dor .trophy-celebration-visual::after { background: linear-gradient(0deg, rgba(14,17,14,.94), rgba(7,8,7,.02) 70%); }
  .trophy-celebration-panel.is-ballon-dor .trophy-celebration-visual img { object-position: center 44%; }
  .trophy-celebration-emblem { left: 12px; bottom: 10px; width: 46px; height: 46px; font-size: 9px; }
  .trophy-celebration-content { padding: 18px 17px 16px; }
  .trophy-celebration-panel.is-cabinet .trophy-celebration-content { max-height: calc(100dvh - 24px); }
  .trophy-celebration-panel h2 { margin-right: 38px; font-size: 22px; }
  .trophy-celebration-copy { font-size: 10px; }
  .trophy-celebration-new span { padding: 6px 8px; font-size: 13px; }
  .trophy-moment-total { margin-top: 14px; padding-top: 11px; }
  .trophy-cabinet-grid { grid-template-columns: 1fr; }
  .star-encounter-overlay { padding: 14px; }
  .star-encounter-panel { width: 100%; height: auto; max-height: calc(100dvh - 28px); aspect-ratio: auto; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
  .star-encounter-panel::after { display: none; }
  .star-encounter-media { position: relative; inset: auto; width: 100%; aspect-ratio: 3 / 2; flex: 0 0 auto; }
  .star-encounter-media::after { display: none; }
  .star-encounter-visual { object-fit: contain; object-position: center; }
  .star-encounter-close { top: 12px; right: 12px; width: 38px; height: 38px; }
  .star-encounter-content { position: relative; left: auto; right: auto; bottom: auto; width: auto; margin-top: -1px; padding: 17px 20px max(22px, env(safe-area-inset-bottom)); background: #080a09; }
  .star-encounter-kicker { font-size: 10px; }
  .star-encounter-mark { width: 48px; height: 54px; margin-top: 13px; font-size: 10px; }
  .star-encounter-panel h2 { margin-top: 14px; font-size: 32px; }
  .star-encounter-panel p { margin-top: 11px; font-size: 13px; line-height: 1.6; }
}

@media (max-width: 680px) {
  .identity-screen, .career-screen {
    width: 100%;
    height: calc(100dvh - 56px);
    min-height: 0;
    margin: 0;
    padding: 10px 12px max(10px, env(safe-area-inset-bottom));
    overflow: hidden;
  }

  .identity-screen {
    display: grid;
    grid-template-rows: auto 46px minmax(0, 1fr) 52px;
    gap: 8px;
  }
  .identity-screen .screen-heading { margin: 0; }
  .identity-screen .screen-heading .eyebrow { margin-bottom: 3px; font-size: 8px; }
  .identity-screen .screen-heading h1 { font-size: 22px; line-height: 1.1; }
  .identity-screen .screen-heading > p:last-child { display: none; }

  .identity-view-tabs, .career-view-tabs {
    min-width: 0;
    display: grid;
    gap: 3px;
    padding: 3px;
    border: 1px solid rgba(132, 151, 140, .32);
    border-radius: 7px;
    background: rgba(8, 11, 9, .86);
  }
  .identity-view-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 0; border: 0; background: transparent; }
  .career-view-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .identity-view-tabs button, .career-view-tabs button {
    min-width: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #8f9a93;
    font-size: 10px;
    font-weight: 850;
  }
  .identity-view-tabs button.active, .career-view-tabs button.active { background: #e8ede9; color: #101311; }
  .identity-view-tabs button {
    padding: 0 7px;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(132, 151, 140, .48);
    border-radius: 7px;
    background: rgba(8, 12, 10, .9);
    color: #c5cec8;
  }
  .identity-view-tabs button.active { border-color: #82d8af; box-shadow: inset 0 -2px #58bf8e; }
  .identity-view-tabs button strong { min-width: 0; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .identity-step-number {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(132, 151, 140, .44);
    border-radius: 4px;
    color: #75c99f;
    font-size: 7px;
    font-weight: 900;
  }
  .identity-view-tabs button.active .identity-step-number { border-color: #244938; background: #244938; color: #cffff0; }

  .identity-layout { min-height: 0; height: 100%; overflow: hidden; }
  .identity-layout .identity-column { display: none; min-height: 0; }
  .identity-layout.is-player {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(148px, 42%) minmax(0, 1fr);
    gap: 8px;
  }
  .identity-layout.is-player .identity-kit-column { display: flex; flex-direction: column; }
  .identity-layout.is-player .identity-details-column { display: block; overflow-y: auto; overscroll-behavior: contain; }
  .identity-layout.is-player .identity-country-panel { display: none; }
  .identity-layout.is-country { display: block; }
  .identity-layout.is-country .identity-details-column { height: 100%; display: flex; flex-direction: column; }
  .identity-layout.is-country .identity-basics { display: none; }
  .identity-layout.is-country .identity-country-panel { min-height: 0; height: 100%; margin: 0; display: flex; flex-direction: column; }
  .identity-layout.is-position { display: block; }
  .identity-layout.is-position .position-column { height: 100%; display: flex; flex-direction: column; }
  .identity-column h2 { margin-bottom: 6px; color: #d7ddd9; font-size: 10px; }
  .identity-kit-column .kit-stage { min-height: 0; height: 100%; padding: 8px 14px; flex-direction: row; gap: 18px; }
  .identity-kit-column .kit { width: 112px; height: 106px; flex: 0 0 auto; }
  .identity-kit-column .kit-name { max-width: 78px; font-size: 9px; }
  .identity-kit-column .kit-number { font-size: 38px; }
  .identity-kit-column .kit-meta { max-width: 150px; margin-top: 0; color: #c3cbc5; font-size: 10px; line-height: 1.55; }
  .identity-basics .field { margin-bottom: 8px; }
  .identity-basics .field label, .identity-basics .field-label { margin-bottom: 5px; font-size: 9px; }
  .identity-basics .text-input { height: 40px; }
  .identity-basics .bridge-profile-card { height: 40px; padding-block: 3px; }
  .identity-basics .bridge-profile-avatar { width: 30px; height: 30px; }
  .identity-basics .segment-button { min-height: 38px; }
  .identity-country-panel > .field-label { margin-bottom: 6px; font-size: 9px; }
  .identity-country-panel .country-selector { min-height: 0; flex: 1; display: flex; flex-direction: column; }
  .identity-country-panel .country-selected { min-height: 46px; padding: 7px 9px; }
  .identity-country-panel .country-search-wrap { padding: 6px; }
  .identity-country-panel .country-search { height: 36px; }
  .identity-country-panel .country-list { min-height: 0; max-height: none; flex: 1; padding: 6px; }
  .identity-country-panel .nation-button { min-height: 38px; }
  .identity-layout.is-position .position-pitch { min-height: 0; height: 100%; flex: 1; padding: 8px; gap: 4px; }
  .identity-layout.is-position .position-button { min-height: 32px; }
  .identity-actions {
    position: static;
    z-index: auto;
    min-height: 0;
    margin: 0;
    padding: 7px 0 0;
    border-top-color: rgba(132, 151, 140, .28);
    background: transparent;
  }
  .identity-actions button { min-height: 42px; }

  .career-screen {
    max-width: 100%;
    display: grid;
    grid-template-rows: auto 40px 36px minmax(0, 1fr);
    gap: 8px;
  }
  .career-screen .player-banner {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 6px 10px;
    padding: 9px 10px 7px;
    overflow: hidden;
    border-color: rgba(132, 151, 140, .42);
    background: rgba(8, 12, 10, .92);
  }
  .career-screen .ovr-block { width: 52px; height: 52px; }
  .career-screen .ovr-block::before { top: 5px; font-size: 7px; }
  .career-screen .ovr-block strong { padding-top: 7px; font-size: 22px; }
  .career-screen .player-identity { grid-column: 2; }
  .career-screen .player-identity h1 { font-size: 19px; }
  .career-screen .player-identity p { margin-top: 3px; font-size: 9px; }
  .career-screen .club-line { margin-top: 4px; gap: 5px; }
  .career-screen .club-mark { width: 22px; height: 25px; }
  .career-screen .club-line strong { font-size: 10px; }
  .career-screen .career-stats {
    grid-column: 1 / -1;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    height: 40px;
    margin: 0;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border: 0;
    border-top: 1px solid rgba(132, 151, 140, .2);
  }
  .career-screen .career-stat { height: 40px; padding: 5px 2px 7px; background: transparent; }
  .career-screen .career-stat::after { inset: auto 5px 3px; height: 1px; }
  .career-screen .career-stat span { height: 10px; font-size: 7px; line-height: 10px; }
  .career-screen .career-stat strong { min-height: 17px; margin-top: 2px; font-size: 12px; line-height: 1; }
  .career-screen .career-stat:nth-child(2) strong { font-size: 10px; }
  .career-screen .trophy-strip { min-width: 0; width: 100%; max-width: 100%; min-height: 0; height: 40px; margin: 0; padding: 4px 7px; overflow: hidden; }
  .career-screen .trophy-cabinet-trigger { gap: 5px; }
  .career-screen .trophy-label { font-size: 11px; }
  .career-screen .trophy-list { gap: 5px; }
  .career-screen .trophy-chip { padding: 4px 6px; font-size: 11px; }
  .career-screen .empty-trophy { font-size: 10px; white-space: nowrap; }
  .career-screen .retire-career-button { position: static; min-height: 28px; padding: 0 8px; font-size: 10px; }
  .career-screen .career-view-tabs button { font-size: 11px; }

  .career-layout { min-width: 0; width: 100%; max-width: 100%; min-height: 0; height: 100%; display: block; padding: 0; overflow: hidden; }
  .career-layout.is-decision .timeline-section { display: none; }
  .career-layout.is-history .decision-section { display: none; }
  .decision-section {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    height: 100%;
    padding-right: 1px;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }
  .decision-section::-webkit-scrollbar { display: none; }
  .decision-section .outcome-banner {
    min-height: 0;
    flex: 0 0 auto;
    margin: 0 0 7px;
    padding: 7px 9px;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
  }
  .decision-section .outcome-banner > div { min-width: 0; }
  .decision-section .outcome-label { min-width: 0; padding: 5px 7px; font-size: 9px; }
  .decision-section .outcome-banner strong { overflow: visible; font-size: 13px; line-height: 1.25; overflow-wrap: anywhere; white-space: normal; }
  .decision-section .outcome-banner p { margin-top: 3px; display: block; overflow: visible; font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
  .decision-section .decision-kicker { min-height: 21px; margin: 0 0 5px; padding: 0 6px; font-size: 9px; }
  .decision-section h2 { display: block; overflow: visible; font-size: 20px; line-height: 1.2; overflow-wrap: anywhere; }
  .decision-section > p { margin: 5px 0 0; display: block; overflow: visible; font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
  .decision-grid {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    height: auto;
    flex: 0 0 auto;
    margin-top: 7px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(84px, auto);
    gap: 6px;
  }
  .decision-grid.decision-count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .decision-grid.decision-count-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .decision-grid.decision-count-3 .decision-card:last-child { grid-column: 1 / -1; }
  .decision-grid.decision-count-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .decision-card {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    height: auto;
    padding: 7px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 7px;
    row-gap: 4px;
    border-radius: 7px;
    overflow: hidden;
    background: color-mix(in srgb, var(--decision-accent) 7%, #0e1210);
    text-align: left;
  }
  .decision-mark { grid-column: 1; grid-row: 1; width: 42px; height: 48px; align-self: center; font-size: 8px; }
  .national-decision-mark { grid-template-rows: 25px auto; padding: 5px 3px; }
  .decision-flag { width: 27px; }
  .decision-copy { grid-column: 2; grid-row: 1; min-width: 0; width: 100%; margin: 0; display: flex; flex-direction: column; align-items: flex-start; }
  .decision-card small { width: 100%; overflow: visible; color: #aab4ad; font-size: 8px; line-height: 1.25; overflow-wrap: anywhere; text-overflow: clip; white-space: normal; }
  .decision-card strong { width: 100%; margin: 3px 0 0; display: block; overflow: visible; font-size: 11px; line-height: 1.22; overflow-wrap: anywhere; white-space: normal; }
  .decision-effect { grid-column: 1 / -1; grid-row: 2; width: 100%; margin: 0; padding-top: 4px; display: block; overflow: visible; border-top: 1px solid rgba(132, 151, 140, .2); font-size: 8px; line-height: 1.3; overflow-wrap: anywhere; white-space: normal; }
  .decision-count-4 .decision-mark { width: 42px; height: 48px; }
  .decision-count-4 .decision-card { padding-inline: 7px; }
  .decision-count-4 .decision-card strong { font-size: 10px; }
  .decision-count-4 .decision-effect { font-size: 7px; }
  .decision-card.illustrated {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    height: auto;
    padding: 7px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 7px;
    row-gap: 4px;
    overflow: hidden;
  }
  .decision-art { grid-column: 1; grid-row: 1; width: 42px; height: 48px; aspect-ratio: auto; align-self: center; border-radius: 5px; }
  .decision-art-label { left: 4px; right: 4px; bottom: 4px; gap: 2px; font-size: 7px; }
  .decision-art-flag { width: 16px; }
  .decision-card.illustrated .decision-copy { grid-column: 2; grid-row: 1; margin: 0; align-self: center; }
  .decision-card.illustrated .decision-copy strong { margin-top: 3px; font-size: 11px; }
  .decision-card.illustrated .decision-effect { grid-column: 1 / -1; grid-row: 2; margin: 0; padding-top: 4px; }

  .timeline-section { min-height: 0; height: 100%; display: flex; flex-direction: column; overflow: hidden; }
  .timeline-section h2 { font-size: 18px; }
  .timeline-summary { margin: 3px 0 6px; font-size: 8px; }
  .timeline-list { min-height: 0; max-height: none; flex: 1; overflow-y: auto; padding-right: 4px; overscroll-behavior: contain; }
  .timeline-row { grid-template-columns: 38px 1fr; gap: 7px; padding: 7px 0; }
  .timeline-age { font-size: 9px; }
  .timeline-row strong { font-size: 10px; }
  .timeline-row p { margin-top: 2px; font-size: 8px; }
  .national-strip { margin-top: 6px; padding: 7px; border: 1px solid rgba(132, 151, 140, .3); border-radius: 7px; background: rgba(9, 13, 11, .86); }
  .national-strip h3 { margin-bottom: 5px; font-size: 9px; }
  .national-strip-flag { width: 22px; }
  .national-stats div { padding: 6px 4px; }
  .national-stats strong { font-size: 12px; }
  .national-stats span { margin-top: 2px; font-size: 7px; }

  .retired-screen {
    width: 100%;
    height: calc(100dvh - 56px);
    min-height: 0;
    margin: 0;
    padding: 10px 12px max(10px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: minmax(0, 1fr) 122px;
    grid-template-rows: auto 58px 44px;
    align-content: center;
    gap: 8px;
    overflow: hidden;
  }
  .retired-hero {
    grid-column: 1 / -1;
    min-height: 0;
    padding: 8px 0 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 102px;
    gap: 4px 8px;
    overflow: visible;
    text-align: left;
  }
  .retired-hero > .eyebrow, .retired-hero > h1, .retired-hero > p { grid-column: 1 / -1; max-width: none; margin-inline: 0; }
  .retired-hero > .eyebrow { margin-top: 0; font-size: 8px; }
  .retired-hero h1 { font-size: 27px; line-height: 1.08; }
  .retired-hero > p:not(.eyebrow) { margin-top: 3px; font-size: 9px; line-height: 1.4; }
  .retirement-reason { grid-column: 1; width: 100%; margin: 6px 0 0; padding: 9px 10px; align-self: stretch; }
  .retirement-reason span { font-size: 7px; }
  .retirement-reason h2 { margin-top: 4px; font-size: 14px; line-height: 1.2; }
  .retirement-reason p { margin-top: 5px; font-size: 9px; line-height: 1.4; }
  .legacy-rating {
    grid-column: 2;
    grid-row: 4;
    min-width: 0;
    width: 100%;
    margin: 6px 0 0;
    padding: 8px 5px;
    align-self: stretch;
    align-content: center;
    border: 1px solid #625332;
    border-radius: 7px;
    background: rgba(24, 20, 10, .82);
  }
  .legacy-stars { min-width: 0; grid-template-columns: repeat(5, 15px); gap: 3px; }
  .legacy-star { width: 15px; height: 18px; font-size: 17px; }
  .legacy-rating > span { font-size: 7px; line-height: 1.35; text-align: center; }
  .retired-screen .player-banner {
    grid-column: 1 / -1;
    height: 58px;
    margin: 0;
    padding: 0;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
  }
  .retired-screen .career-stat { height: 56px; padding: 7px 2px 5px; border-top: 0; border-left: 1px solid rgba(132, 151, 140, .2); }
  .retired-screen .career-stat:first-child { border-left: 0; }
  .retired-screen .career-stat span { font-size: 6px; line-height: 1.15; white-space: normal; }
  .retired-screen .career-stat strong { margin-top: 4px; font-size: 12px; }
  .retired-screen > .intro-lead { grid-column: 1; margin: 0; align-self: center; color: #c1c9c3; font-size: 8px; line-height: 1.45; text-align: left; }
  .retired-screen .restart-button { grid-column: 2; width: 100%; min-height: 42px; margin: 0; padding-inline: 8px; font-size: 11px; }

  .career-settlement-overlay { overflow: hidden; }
  .career-settlement-panel {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    margin: 0;
    padding: max(42px, env(safe-area-inset-top)) 10px max(8px, env(safe-area-inset-bottom));
    overflow: hidden;
  }
  .career-settlement-backdrop { object-position: center 45%; filter: saturate(.9) contrast(1.08) brightness(.58); opacity: .48; }
  .career-settlement-close { top: max(7px, env(safe-area-inset-top)); right: 8px; width: 32px; height: 32px; font-size: 21px; }
  .career-settlement-content {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(6, auto);
    grid-template-areas: "profile" "verdict" "national" "honors" "performance" "clubs";
    align-content: center;
    gap: 3px;
  }
  .career-settlement-profile { grid-template-columns: 52px minmax(0, 1fr) 88px; gap: 8px; }
  .settlement-peak-block { width: 52px; }
  .settlement-peak-block span { font-size: 6px; }
  .settlement-peak-block strong { font-size: 24px; }
  .career-settlement-kicker { font-size: 7px; }
  .settlement-player-copy h1 { margin-top: 3px; font-size: 19px; line-height: 1.05; }
  .settlement-player-copy p { margin-top: 4px; gap: 4px; font-size: 7px; line-height: 1.25; }
  .settlement-player-copy small { margin-top: 3px; font-size: 6px; line-height: 1.25; }
  .settlement-player-flag { width: 18px; height: 12px; }
  .settlement-profile-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid rgba(255,255,255,.13); border-bottom: 1px solid rgba(255,255,255,.13); }
  .settlement-profile-totals span { padding: 6px 3px; border-left: 0; font-size: 6px; text-align: center; }
  .settlement-profile-totals span + span { border-left: 1px solid rgba(255,255,255,.12); }
  .settlement-profile-totals strong { margin-top: 2px; font-size: 16px; }
  .career-settlement-verdict { padding: 7px 9px; }
  .career-settlement-verdict > span { font-size: 6px; }
  .career-settlement-verdict h2 { margin-top: 2px; font-size: 24px; line-height: 1; }
  .career-settlement-verdict strong { margin-top: 3px; font-size: 8px; }
  .career-settlement-verdict p { margin-top: 3px; font-size: 8px; line-height: 1.3; }
  .career-settlement-national { padding: 5px 7px; grid-template-columns: 94px minmax(0, 1fr); gap: 5px; }
  .career-settlement-national > div { gap: 5px; }
  .settlement-national-flag { width: 23px; height: 15px; }
  .career-settlement-national small { font-size: 7px; }
  .career-settlement-national strong { font-size: 9px; }
  .career-settlement-national dl { grid-template-columns: 43px 43px minmax(0, 1fr); }
  .career-settlement-national dl div { padding: 2px 3px; }
  .career-settlement-national dt { font-size: 6px; }
  .career-settlement-national dd { margin-top: 2px; font-size: 10px; }
  .career-settlement-national dl div:last-child dd { font-size: 8px; }
  .career-settlement-section-heading { padding-bottom: 3px; }
  .career-settlement-section-heading span { font-size: 6px; }
  .career-settlement-section-heading h3 { margin-top: 1px; font-size: 11px; }
  .career-settlement-section-heading > strong { font-size: 7px; }
  .career-settlement-award-grid { margin-top: 4px; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; }
  .career-settlement-award { padding: 2px 1px 3px; border-radius: 4px; }
  .career-settlement-award > div { height: 28px; }
  .career-settlement-award img { width: 100%; height: 26px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.4)); }
  .career-settlement-award > div span { right: 0; bottom: 0; padding: 1px 3px; font-size: 6px; }
  .career-settlement-award > strong { min-height: 14px; font-size: 7px; line-height: 1.15; }
  .career-settlement-empty { margin-top: 4px; padding: 6px; font-size: 6px; }
  .career-settlement-performance > div { padding: 4px; }
  .career-settlement-performance span { font-size: 7px; }
  .career-settlement-performance strong { margin-top: 2px; font-size: 17px; }
  .career-settlement-club-grid { margin-top: 4px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
  .career-settlement-club { min-height: 29px; grid-template-columns: 25px minmax(0, 1fr); column-gap: 4px; }
  .settlement-club-crest { width: 24px; height: 27px; }
  .career-settlement-club > strong { font-size: 7px; line-height: 1.15; }
  .career-settlement-club > span { margin-top: 1px; font-size: 6px; }
}

@media (max-width: 680px) and (min-height: 760px) {
  .career-screen {
    grid-template-rows: auto 48px 42px minmax(0, 1fr);
    gap: 10px;
  }
  .career-screen .trophy-strip { height: 48px; padding: 6px 9px; }
  .career-screen .retire-career-button { min-height: 32px; padding-inline: 10px; }
  .career-view-tabs { padding: 4px; }
  .decision-section .outcome-banner { margin-bottom: 10px; padding: 10px 12px; gap: 10px; }
  .decision-section .decision-kicker { margin-bottom: 6px; }
  .decision-section h2 { font-size: 22px; }
  .decision-section > p { font-size: 11px; }
  .decision-grid {
    height: clamp(220px, 28dvh, 238px);
    flex-basis: clamp(220px, 28dvh, 238px);
    margin-top: 11px;
  }
  .decision-card { padding-block: 9px; }
}

@media (max-width: 370px) {
  .intro-copy h1 { font-size: 33px; }
  .country-list { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr 80px; }
  .career-settlement-profile { grid-template-columns: 48px minmax(0, 1fr) 80px; gap: 6px; }
  .settlement-peak-block { width: 48px; }
  .career-settlement-award-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
