/* ============================================================
   SCREEN STYLES
   ============================================================ */

/* --- MAIN MENU -------------------------------------------- */

.screen-menu {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px calc(40px + var(--safe-bottom));
  background: linear-gradient(180deg, #04040d 0%, #0a0820 40%, #0d0f1a 100%);
  position: relative;
  overflow: hidden;
}
.menu-stadium-art {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 200px;
  background: linear-gradient(180deg, transparent 0%, #0a1a0a 40%, #0d3d10 70%, #082808 100%);
  opacity: 0.4;
}
.menu-stars {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(1px 1px at 20% 15%, white, transparent),
    radial-gradient(1px 1px at 70% 8%, white, transparent),
    radial-gradient(1px 1px at 45% 25%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 85% 18%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 10% 40%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 60% 35%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 30% 50%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 90% 45%, rgba(255,255,255,0.5), transparent);
}
.menu-content {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
  max-width: 340px;
}
.menu-crest {
  width: 80px; height: 80px;
  margin: 0 auto 20px;
  background: var(--accent-gold);
  border-radius: 50% 50% 40% 40% / 50% 50% 45% 45%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  box-shadow: 0 0 40px rgba(245,200,66,0.3);
}
.menu-crest::before {
  content: '';
  position: absolute;
  width: 50px; height: 50px;
  background: #0d0f1a;
  border-radius: 50% 50% 35% 35% / 50% 50% 40% 40%;
}
.menu-crest-letter {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-gold);
}
.menu-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.menu-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 48px;
}
.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.menu-version {
  margin-top: 32px;
  font-size: 11px;
  color: var(--text-dim);
}

/* Name input */
.name-setup {
  width: 100%;
  text-align: left;
  margin-bottom: 32px;
}
.name-setup label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.name-setup input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 16px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color var(--transition);
  min-height: var(--tap-min);
}
.name-setup input:focus { border-color: var(--accent-gold); }

/* Save tip */
.menu-save-tip {
  margin-top: 20px;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.7;
  text-align: center;
}

/* Back link */
.menu-back-link {
  display: block;
  color: var(--accent-gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
  opacity: 0.8;
  text-align: left;
  cursor: pointer;
}

/* Saved games section label */
.menu-section-label {
  width: 100%;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 10px;
  margin-top: 4px;
}

/* Save slot list */
.menu-slot-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.menu-slot-list-hidden { display: none; }
.menu-slot-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}
.menu-slot-info {
  flex: 1;
  min-width: 0;
}
.menu-slot-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.menu-slot-date {
  font-size: 11px;
  color: var(--accent-gold);
  opacity: 0.85;
  margin-bottom: 2px;
}
.menu-slot-progress {
  font-size: 11px;
  color: var(--text-dim);
}
.menu-slot-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.menu-slot-load {
  padding: 8px 14px;
  background: var(--accent-gold);
  color: #000;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  min-height: var(--tap-min);
}
.menu-slot-delete {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  color: var(--text-dim);
  opacity: 0.6;
  cursor: pointer;
  transition: opacity var(--transition);
}
.menu-slot-delete:hover { opacity: 1; color: var(--accent-red); }

/* Hub save toast */
.hub-save-toast {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 24, 40, 0.92);
  border: 1px solid var(--accent-gold);
  border-radius: 24px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.04em;
  white-space: nowrap;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.hub-save-toast.hub-save-toast-show { opacity: 1; }
.hub-save-toast.hub-save-toast-hide { opacity: 0; transition: opacity 0.4s ease; }

/* Hub load modal */
.hub-load-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: var(--safe-bottom);
}
.hub-load-modal {
  width: 100%;
  max-height: 70%;
  background: var(--bg-card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 0 0 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hub-load-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.hub-load-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.hub-load-close {
  font-size: 16px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 8px;
}
.hub-load-empty {
  padding: 24px 20px;
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
}
.hub-load-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.hub-load-slot:last-child { border-bottom: none; }
.hub-load-slot-info { flex: 1; min-width: 0; }
.hub-load-slot-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hub-load-slot-date {
  font-size: 11px;
  color: var(--accent-gold);
  opacity: 0.85;
  margin-bottom: 2px;
}
.hub-load-slot-progress {
  font-size: 11px;
  color: var(--text-dim);
}
.hub-load-slot-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.hub-load-slot-btn {
  padding: 8px 14px;
  background: var(--accent-gold);
  color: #000;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  flex-shrink: 0;
  min-height: var(--tap-min);
}
.hub-load-slot-del {
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-dim);
  flex-shrink: 0;
  min-height: var(--tap-min);
}

/* Hub save modal */
.hub-save-modal { max-height: none; }
.hub-save-body {
  padding: 20px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hub-save-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.hub-save-name-row {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 14px;
  gap: 0;
  height: 48px;
}
.hub-save-prefix {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-gold);
  white-space: nowrap;
  flex-shrink: 0;
}
.hub-save-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0;
  min-width: 0;
}
.hub-save-input::placeholder { color: var(--text-dim); font-weight: 400; }
.hub-save-hint {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: -4px;
}
.hub-save-confirm {
  margin-top: 4px;
  width: 100%;
}

/* --- STORY INTRO ----------------------------------------- */

.screen-story-intro {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow-y: auto;
  background: #07080f;
}
.story-intro-img {
  width: calc(100% - 44px);
  margin: 0 22px;
  max-height: 38vh;
  object-fit: cover;
  object-position: center top;
  display: block;
  flex-shrink: 0;
  border-radius: var(--radius-md);
}
.story-intro-card {
  flex: 1;
  padding: 24px 22px calc(28px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(180deg, #0d0f1a 0%, #080a14 100%);
}
.story-intro-p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0;
}
.story-intro-p-last {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  font-style: italic;
}
.story-intro-btn {
  margin-top: 8px;
  align-self: stretch;
}

/* --- HUB DASHBOARD --------------------------------------- */

.screen-hub {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  padding-top: var(--safe-top);
  position: relative;
}
.hub-header {
  padding: 16px 20px 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border);
}
.hub-crest {
  width: 44px; height: 44px;
  background: var(--accent-gold);
  border-radius: 50% 50% 35% 35% / 50% 50% 40% 40%;
  display: flex; align-items: center; justify-content: center;
  padding-bottom: 3px;
  flex-shrink: 0;
}
.hub-crest-letter {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #0d0f1a;
}
.hub-team-info { flex: 1; min-width: 0; }
.hub-team-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}
.hub-manager-name {
  font-size: 12px;
  color: var(--text-muted);
}
.hub-week-badge {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-gold);
  white-space: nowrap;
}
.hub-season-bar {
  padding: 8px 20px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
}
.hub-season-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.hub-season-phase {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-gold);
}
.hub-season-week {
  font-size: 11px;
  color: var(--text-dim);
}
.hub-season-track {
  position: relative;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: visible;
}
.hub-season-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold), #e0a820);
  border-radius: 3px;
  position: relative;
  transition: width 0.6s ease;
}
.hub-season-fill::after {
  content: '';
  position: absolute;
  right: -3px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 6px rgba(245,200,66,0.8);
}
.hub-season-tick {
  position: absolute;
  top: -2px;
  width: 1px;
  height: 10px;
  background: rgba(255,255,255,0.2);
  transform: translateX(-50%);
}

.hub-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hub-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.hub-card-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.hub-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.hub-stat-label { font-size: 13px; color: var(--text-muted); }
.hub-stat-value { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.hub-meter-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hub-meter-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.hub-meter-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hub-meter-name { font-size: 12px; color: var(--text-muted); }
.hub-meter-val  { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.hub-next-match {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hub-next-match-vs {
  flex: 1;
}
.hub-next-match-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.hub-next-match-detail {
  font-size: 12px;
  color: var(--text-muted);
}
.hub-result-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.hub-footer {
  padding: 12px 20px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}
.hub-btn-continue {
  flex: 1;
  padding: 14px;
  background: var(--accent-gold);
  color: #0d0f1a;
  font-weight: 700;
  font-size: 15px;
  border-radius: var(--radius-md);
  text-align: center;
  transition: opacity var(--transition);
  min-height: var(--tap-min);
}
.hub-btn-continue:active { opacity: 0.85; }
.hub-btn-icon {
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 16px;
  min-height: var(--tap-min);
  min-width: var(--tap-min);
}
.hub-btn-icon:active { background: var(--bg-card-hover); }

/* --- STORY SCENE ----------------------------------------- */

.screen-scene {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.scene-bg {
  position: absolute;
  inset: 0;
  transition: background 0.8s ease;
}
.scene-portrait-area {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
  min-height: 0; /* allow flex child to shrink */
  padding: 16px 16px 12px;
}
/* Image mode: portrait-wrap fills the portrait area; img uses max-width/max-height
   (inline styles on the elements are the canonical sizing — these are fallback/override guards) */
.scene-portrait-area .portrait-wrap.portrait-image,
.decision-portrait-area .portrait-wrap.portrait-image {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  overflow: hidden !important;
}
.scene-portrait-area .portrait-wrap.portrait-image img,
.decision-portrait-area .portrait-wrap.portrait-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: bottom center;
  display: block;
}
/* Player-moment splash: constrained portrait, bottom-aligned */
.player-moment-portrait .portrait-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.player-moment-portrait .portrait-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  display: block;
}
.scene-tap-hint {
  position: absolute;
  top: calc(16px + var(--safe-top));
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
  z-index: 2;
  animation: pulse-hint 2s ease-in-out infinite;
}
.scene-dialogue-area {
  position: relative;
  z-index: 2;
  padding: 0 16px calc(16px + var(--safe-bottom));
  flex-shrink: 0; /* never shrink — portrait area absorbs the space */
}
.scene-dialogue-box {
  background: rgba(10, 11, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  padding: 14px 18px 12px;
  cursor: pointer;
  user-select: none;
  /* Fixed height so the box never resizes */
  height: 168px;
  display: flex;
  flex-direction: column;
}
.scene-speaker-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
.scene-dialogue-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* hide scrollbar visually but keep it functional */
  scrollbar-width: none;
}
.scene-dialogue-text::-webkit-scrollbar { display: none; }
.scene-continue-indicator {
  text-align: right;
  margin-top: 6px;
  color: var(--accent-gold);
  font-size: 13px;
  opacity: 0.7;
  flex-shrink: 0;
  animation: pulse-hint 1.5s ease-in-out infinite;
}

/* --- DECISION PANEL -------------------------------------- */

.screen-decision {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.decision-bg {
  position: absolute;
  inset: 0;
}
.decision-portrait-area {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
  min-height: 80px;
  padding: 16px 16px 12px;
}
.decision-content {
  position: relative;
  z-index: 2;
  flex-shrink: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 16px calc(16px + var(--safe-bottom));
}
.decision-prompt-box {
  background: rgba(10, 11, 20, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-sm) var(--radius-sm);
  padding: 16px 18px 12px;
  margin-bottom: 2px;
}
.decision-speaker {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}
.decision-prompt-text {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-primary);
}
.decision-selected-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-gold);
  line-height: 1.5;
}
.decision-choices {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.choice-card {
  background: rgba(26, 29, 46, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  min-height: var(--tap-min);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.choice-card:last-child { border-radius: var(--radius-sm) var(--radius-sm) var(--radius-lg) var(--radius-lg); }
.choice-card:active { background: var(--bg-card-hover); border-color: var(--accent-gold); }
.choice-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.choice-hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Animation zone — replaces choices after a pick, preserves height */
.decision-anim-zone {
  position: relative;
  flex-shrink: 0;
}

/* Flying effect chips — anchored to animZone for correct positioning */
.effect-burst-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: visible;
}
/* Full-screen tap layer that appears after chips settle */
.effect-tap-layer {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  cursor: pointer;
  z-index: 10000;
}
.effect-chip {
  position: absolute;
  top: 50%;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 16px;
}
.effect-chip-icon {
  font-size: 28px;
  line-height: 1;
}
.effect-chip-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
}
.effect-chip.positive {
  background: rgba(61, 220, 132, 0.2);
  border: 1.5px solid rgba(61, 220, 132, 0.55);
  color: #3ddc84;
  box-shadow: 0 0 14px rgba(61, 220, 132, 0.3);
}
.effect-chip.negative {
  background: rgba(224, 85, 85, 0.2);
  border: 1.5px solid rgba(224, 85, 85, 0.55);
  color: #e05555;
  box-shadow: 0 0 14px rgba(224, 85, 85, 0.3);
}
.effect-chip.fly-up {
  animation: effectFlyUp 2.2s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.effect-chip.fly-down {
  animation: effectFlyDown 2.2s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
@keyframes effectFlyUp {
  0%   { opacity: 0; transform: translateX(-50%) translateY(-50%) scale(0.7); }
  20%  { opacity: 1; transform: translateX(-50%) translateY(calc(-50% - 8px)) scale(1.1); }
  100% { opacity: 1; transform: translateX(-50%) translateY(calc(-50% - 46px)) scale(1); }
}
@keyframes effectFlyDown {
  0%   { opacity: 0; transform: translateX(-50%) translateY(-50%) scale(0.7); }
  20%  { opacity: 1; transform: translateX(-50%) translateY(calc(-50% + 8px)) scale(1.1); }
  100% { opacity: 1; transform: translateX(-50%) translateY(calc(-50% + 70px)) scale(1); }
}
.effect-continue-hint {
  position: absolute;
  top: calc(16px + var(--safe-top));
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
  animation: transition-hint-pulse 2.4s ease-in-out infinite;
}
@keyframes fadeInHint {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --- MATCH SCREEN ---------------------------------------- */

.screen-match {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #06070f;
  position: relative;
  overflow: hidden;
}
.match-pitch-art {
  display: none;
}
.match-pitch-lines {
  position: absolute;
  top: 15%;
  left: 10%;
  right: 10%;
  bottom: 10%;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
}
.match-pitch-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
}
.match-pitch-halfway {
  position: absolute;
  top: 15%;
  bottom: 10%;
  left: 50%;
  width: 1px;
  background: rgba(255,255,255,0.08);
}
.match-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: calc(var(--safe-top) + 20px) 20px calc(20px + var(--safe-bottom));
}
.match-header {
  text-align: center;
  margin-bottom: 20px;
}
.match-comp-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.match-competition-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.match-scoreboard {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 8px;
}
.match-team {
  flex: 1;
  text-align: center;
}
.match-team-name {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}
.match-team-name.home { color: var(--accent-gold); }
.match-score-box {
  display: flex;
  align-items: center;
  gap: 8px;
}
.match-score-num {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  min-width: 44px;
  text-align: center;
}
.match-score-sep {
  font-size: 32px;
  color: var(--text-dim);
  font-weight: 300;
}
.match-result-label {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.match-result-label.win  { color: var(--accent-green); }
.match-result-label.draw { color: var(--accent-gold); }
.match-result-label.loss { color: var(--accent-red); }

/* ── Match simulation live bar ── */
.match-live-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 20px 10px;
}
.match-live-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #e04040;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.match-live-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e04040;
  animation: live-dot-pulse 1.1s ease-in-out infinite;
}
@keyframes live-dot-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}
.match-live-clock {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 3.2ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.match-live-progress {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.match-live-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-gold);
  border-radius: 2px;
}

/* Score number flash when a goal fires */
@keyframes sb-num-flash {
  0%   { transform: scale(1.5); color: var(--accent-gold); }
  100% { transform: scale(1);   color: inherit; }
}
.sb-num-flash {
  animation: sb-num-flash 0.45s ease-out forwards;
  display: inline-block;
}

/* New scorer row slides in */
@keyframes scorer-appear {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sb-scorer-new {
  animation: scorer-appear 0.3s ease-out forwards;
}

/* Skip hint — fixed at screen bottom during simulation */
.match-skip-hint {
  position: absolute;
  bottom: calc(16px + var(--safe-bottom));
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  opacity: 0.45;
  pointer-events: none;
  z-index: 5;
}

/* --- TACTICAL CARD TRAY ------------------------------------ */

.tac-tray {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 0 6px;
}
.tac-tray-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
}
.tac-cards-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.tac-card {
  width: 52px;
  height: 74px;
  perspective: 600px;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.tac-card.used {
  cursor: default;
  pointer-events: none;
}
.tac-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(.4,0,.2,1);
}
.tac-card.used .tac-card-inner {
  transform: rotateY(180deg);
}
.tac-card-front,
.tac-card-back {
  position: absolute;
  inset: 0;
  border-radius: 7px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 2px;
}
.tac-card-front {
  background: linear-gradient(160deg, #1e2a1e 0%, #0a140a 100%);
  border: 1px solid rgba(100, 200, 70, 0.4);
  box-shadow: 0 2px 8px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.04);
}
.tac-card-front:hover,
.tac-card:hover .tac-card-front {
  border-color: rgba(100, 200, 70, 0.75);
  box-shadow: 0 2px 12px rgba(100,200,70,0.2);
}
.tac-card-back {
  background: linear-gradient(160deg, #1a1a2e 0%, #0f0f1a 100%);
  border: 1px solid rgba(245, 200, 66, 0.18);
  transform: rotateY(180deg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.tac-icon {
  font-size: 22px;
  line-height: 1;
}
.tac-name {
  font-size: 7.5px;
  text-align: center;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  line-height: 1.3;
}
.tac-back-mark {
  font-size: 20px;
  color: var(--gold);
  opacity: 0.2;
}
.tac-tray-hint {
  font-size: 9px;
  color: var(--text-muted);
  opacity: 0.55;
  text-align: center;
  letter-spacing: 0.03em;
}

/* --- END TACTICAL CARD TRAY -------------------------------- */

.match-moments {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.match-moment {
  background: rgba(10,11,20,0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
}
.match-moment-time {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 2px;
}
.match-footer {
  padding-top: 12px;
  flex-shrink: 0;
}

/* ── New match content layout ── */
.match-content {
  overflow: hidden;
}
.match-scroll-area {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  padding-bottom: 4px;
}
.match-section-divider {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 18px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.match-section-divider::before,
.match-section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Classic scoreboard — TV broadcast frame ── */
.match-sb-wrap {
  background: rgba(6, 8, 18, 0.97);
  border-radius: var(--radius-md);
  padding: 14px 16px 10px;
  margin-bottom: 10px;
  border-top: 2px solid var(--accent-gold);
  border-left: 1px solid rgba(255,255,255,0.18);
  border-right: 1px solid rgba(255,255,255,0.18);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.8),
    0 0 0 3px rgba(245,200,66,0.12),
    0 8px 32px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.08);
}
.match-sb-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.match-sb-team {
  flex: 1;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.match-sb-team:last-child { text-align: right; }
.match-sb-team.valhalla   { color: var(--accent-gold); }
.match-sb-score {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.sb-num {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  min-width: 36px;
  text-align: center;
}
.sb-dash {
  font-size: 26px;
  color: var(--text-dim);
  font-weight: 300;
}
.match-sb-scorers {
  display: flex;
  gap: 8px;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 8px;
}
.sb-scorer-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sb-scorer-col.right { align-items: flex-end; }
.sb-scorer {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}
.sb-ball { font-size: 10px; }

/* Tiny sticker portrait shown inline next to key player names */
.player-sticker-icon {
  display: inline-block;
  height: 1.25em;
  width: 1.25em;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 3px;
  border-radius: 2px;
  position: relative;
  top: -0.05em;
}

.sb-scorer-name {
  color: var(--text-primary);
  font-weight: 600;
}
.sb-scorer-min {
  color: var(--text-dim);
  font-size: 10px;
}

/* ── Result label ── */
.match-result-label {
  margin-bottom: 10px;
}

/* ── Panes ── */
.match-pane { display: flex; flex-direction: column; gap: 6px; }

/* ── Timeline rows ── */
.match-tl-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  background: rgba(10,11,20,0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.match-tl-row.our-goal {
  border-left: 3px solid var(--accent-gold);
  background: rgba(255,190,50,0.06);
}
.match-tl-row.their-goal {
  border-left: 3px solid rgba(224,64,32,0.6);
}
.tl-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}
.filler-icon { opacity: 0.7; }
.tl-body { flex: 1; min-width: 0; }
.tl-main {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}
.tl-min {
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}
.their-goal .tl-min { color: var(--accent-red); }
.tl-scorer {
  color: var(--text-primary);
  font-weight: 600;
}
.tl-sub {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 2px;
}
.tl-score {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  align-self: center;
}
.tl-filler-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.tl-empty {
  padding: 20px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

/* ── Report prose ── */
.match-pane-report {
  padding: 4px 2px 8px;
}
.report-para {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-primary);
  margin-bottom: 14px;
}
.report-para:last-child { margin-bottom: 0; }
.report-para strong {
  color: var(--accent-gold);
  font-weight: 700;
}

/* --- LINEUP SCREEN --------------------------------------- */

.screen-lineup {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  padding-top: var(--safe-top);
}
.lineup-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.lineup-title {
  flex: 1;
  font-size: 17px;
  font-weight: 700;
}
.lineup-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.lineup-done-btn {
  padding: 8px 16px;
  background: var(--accent-gold);
  color: #0d0f1a;
  font-weight: 700;
  font-size: 13px;
  border-radius: var(--radius-sm);
  min-height: var(--tap-min);
}
.lineup-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}
.lineup-pitch {
  width: 165px;
  flex-shrink: 0;
  background: #080a10;
  position: relative;
  border-right: 1px solid var(--border);
}
.lineup-pitch-lines {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255,255,255,0.22);
}
.lineup-pitch-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 50%;
}
.lineup-pitch-halfway {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 50%;
  width: 1px;
  background: rgba(255,255,255,0.18);
}
.lineup-position-slot {
  position: absolute;
  z-index: 1;
  width: 30px; height: 40px;
  border-radius: 6px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1px;
  cursor: grab;
  transition: transform 0.1s, box-shadow 0.1s;
  border: 1.5px solid transparent;
  touch-action: none;
  user-select: none;
  overflow: hidden;
}
.lineup-position-slot:active { cursor: grabbing; }

/* Fit-based fill colours */
.lineup-position-slot.fit-green  { background: rgba(61,220,132,0.82);  border-color: #3ddc84; color: #04200e; }
.lineup-position-slot.fit-yellow { background: rgba(212,175,55,0.88);  border-color: #d4af37; color: #1a1200; }
.lineup-position-slot.fit-orange { background: rgba(245,109,66,0.88);  border-color: #f56d42; color: #1a0800; }
.lineup-position-slot.fit-red    { background: rgba(224,64,32,0.88);   border-color: #e04020; color: #1a0400; }
.lineup-position-slot.empty {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.22);
  border-style: dashed;
  color: rgba(255,255,255,0.45);
}

/* Slot content labels */
.slot-pos {
  font-size: 5.5px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; line-height: 1; opacity: 0.75;
}
.slot-pos-empty { font-size: 7px; opacity: 0.6; }
.slot-name {
  font-size: 6.5px; font-weight: 800; line-height: 1;
  max-width: 28px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  letter-spacing: 0.01em;
}
.slot-rating { font-size: 9px; font-weight: 900; line-height: 1; }

/* Drag states */
.lineup-position-slot.drag-available {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.25);
}
.lineup-position-slot.drag-hover {
  transform: translate(-50%, -50%) scale(1.18) !important;
  box-shadow: 0 0 0 2px white, 0 2px 8px rgba(0,0,0,0.5);
  z-index: 10;
}

/* Drag ghost */
.lineup-drag-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  background: var(--accent-gold);
  color: #0d0f1a;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 8px;
  border-radius: 8px;
  opacity: 0.92;
  white-space: nowrap;
  transform: translate(-50%, -160%);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.lineup-squad-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lineup-drag-hint {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  opacity: 0.6;
  text-align: center;
  padding: 2px 0 4px;
}
.formation-selector {
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
  overflow-x: auto;
}
.formation-btn {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border);
  white-space: nowrap;
  min-height: 32px;
  transition: all var(--transition);
}
.formation-btn.active {
  background: rgba(245,200,66,0.15);
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}
.squad-group-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 2px;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.squad-group-divider::before {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-bright);
}

/* Position group color coding — cards */
.player-card-small.group-fwd { background: rgba(239, 100, 52, 0.08); box-shadow: inset 3px 0 0 rgba(239, 100, 52, 0.55); }
.player-card-small.group-mid { background: rgba(77,  158, 245, 0.08); box-shadow: inset 3px 0 0 rgba(77,  158, 245, 0.55); }
.player-card-small.group-def { background: rgba(61,  220, 132, 0.08); box-shadow: inset 3px 0 0 rgba(61,  220, 132, 0.55); }
.player-card-small.group-gk  { background: rgba(245, 200, 66,  0.08); box-shadow: inset 3px 0 0 rgba(245, 200, 66,  0.55); }

/* Starter border stacks on top of group tint */
.player-card-small.starter.group-fwd,
.player-card-small.starter.group-mid,
.player-card-small.starter.group-def,
.player-card-small.starter.group-gk  { background: inherit; }

/* Pitch zone overlays */
.pitch-zone {
  position: absolute;
  left: 0; right: 0;
  pointer-events: none;
  z-index: 0;
}
.pitch-zone-fwd { background: rgba(239, 100, 52, 0.10); }
.pitch-zone-mid { background: rgba(77,  158, 245, 0.10); }
.pitch-zone-def { background: rgba(61,  220, 132, 0.10); }
.pitch-zone-gk  { background: rgba(245, 200, 66,  0.10); }

.player-card-small {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: all var(--transition);
  min-height: var(--tap-min);
}
.player-card-small:active { cursor: grabbing; }
.player-card-small.selected {
  border-color: var(--accent-gold);
  background: rgba(245,200,66,0.08);
}
.player-card-small.starter {
  border-color: var(--accent-green);
  background: rgba(61,220,132,0.06);
}
.player-card-small.injured {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: inset 3px 0 0 rgba(224,82,82,0.7);
  background: rgba(224,82,82,0.06);
}
.player-card-small.injured .player-pos { color: #e05252; }
.player-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}
.player-num.starter {
  background: var(--accent-green);
  color: #0d1a0d;
}
.player-info { flex: 1; min-width: 0; }
.player-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.player-pos  { font-size: 11px; color: var(--text-muted); }
.player-rating {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-gold);
}

/* --- TRAINING SCREEN ------------------------------------- */

.screen-training {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  padding-top: var(--safe-top);
}
.training-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.training-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.training-option {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition);
  min-height: var(--tap-min);
}
.training-option.selected {
  border-color: var(--accent-gold);
  background: rgba(245,200,66,0.06);
}
.training-option-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.training-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.training-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.training-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.training-effects {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.training-effect-tag {
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.training-footer {
  padding: 12px 20px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--border);
}

/* --- TRANSFER MARKET ------------------------------------- */

.screen-transfer {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  padding-top: var(--safe-top);
}
.transfer-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.transfer-squad-btn {
  font-size: 12px;
  font-weight: 700;
  color: #0d0f1a;
  background: var(--accent-gold);
  padding: 7px 14px;
  border-radius: 20px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.transfer-squad-btn:active { opacity: 0.75; }
.transfer-budget-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.transfer-budget-label { font-size: 12px; color: var(--text-muted); }
.transfer-budget-val { font-size: 16px; font-weight: 700; color: var(--accent-green); }
.transfer-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.transfer-tab {
  flex: 1;
  padding: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  min-height: var(--tap-min);
}
.transfer-tab.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}
.transfer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.transfer-focus-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 0 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.transfer-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.transfer-card-info { flex: 1; min-width: 0; }
.transfer-card-name { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.transfer-card-detail { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.transfer-card-stats {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}
.transfer-stat { font-size: 12px; color: var(--text-muted); }
.transfer-stat span { color: var(--text-primary); font-weight: 600; }
.transfer-card-price {
  text-align: right;
  flex-shrink: 0;
}
.transfer-price { font-size: 14px; font-weight: 700; color: var(--accent-gold); }
.transfer-price-label { font-size: 10px; color: var(--text-dim); margin-top: 2px; }
.transfer-action-btn {
  display: block;
  margin-top: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  min-height: 32px;
}
.transfer-action-btn.buy {
  background: rgba(61,220,132,0.15);
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
}
.transfer-action-btn.sell {
  background: rgba(224,85,85,0.15);
  color: var(--accent-red);
  border: 1px solid var(--accent-red);
}
.transfer-action-btn.disabled {
  background: var(--bg-primary);
  color: var(--text-dim);
  border: 1px solid var(--border);
  pointer-events: none;
}
.transfer-footer {
  padding: 12px 20px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--border);
}

/* --- CALENDAR SCREEN ------------------------------------- */

.screen-calendar {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  padding-top: var(--safe-top);
}
.calendar-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.calendar-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.calendar-phase-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 8px 0 4px;
}
.calendar-event-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  opacity: 0.6;
}
.calendar-event-item.current {
  opacity: 1;
  border-color: var(--accent-gold);
  background: rgba(245,200,66,0.06);
}
.calendar-event-item.done {
  opacity: 0.35;
}
.calendar-event-week {
  font-size: 11px;
  color: var(--text-muted);
  min-width: 40px;
}
.calendar-event-icon { font-size: 16px; }
.calendar-event-label {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.calendar-event-comp {
  font-size: 11px;
  color: var(--text-muted);
}
.calendar-footer {
  padding: 12px 20px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--border);
}

/* --- LEAGUE TABLE ---------------------------------------- */

.screen-league {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  padding-top: var(--safe-top);
}
.league-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.league-back-btn {
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-muted);
  min-height: var(--tap-min);
  white-space: nowrap;
}
.league-back-btn:active { background: var(--bg-card-hover); }
.league-title   { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.league-subtitle { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.league-pos-badge {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-gold);
  background: rgba(245,200,66,0.1);
  border: 1px solid rgba(245,200,66,0.25);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  white-space: nowrap;
}
.league-body {
  flex: 1;
  overflow-y: auto;
}
.league-empty {
  padding: 40px 24px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}
/* --- RESULTS TAB ----------------------------------------- */

.res-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 16px;
}

.res-round-hdr {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 12px 16px 4px;
}
.res-round-hdr:first-child { padding-top: 4px; }

.res-match-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 16px;
  border-left: 3px solid transparent;
  font-size: 12px;
}

/* Valhalla row highlight + outcome border */
.res-match-row.res-val          { background: rgba(255,255,255,0.03); }
.res-match-row.res-val.win      { border-left-color: #4caf80; }
.res-match-row.res-val.draw     { border-left-color: var(--accent-gold); }
.res-match-row.res-val.loss     { border-left-color: #e05252; }

.res-team {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 12px;
}
.res-home { text-align: right; }
.res-away { text-align: left;  }

/* Valhalla team name pops */
.res-team.res-us {
  color: var(--text-primary);
  font-weight: 600;
}

.res-score {
  flex-shrink: 0;
  width: 44px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}
.res-score.win  { color: #4caf80; }
.res-score.draw { color: var(--accent-gold); }
.res-score.loss { color: #e05252; }

/* Column layout: # | Club(flex) | P | W | D | L | GD | Pts */
.league-col-header,
.league-row {
  display: grid;
  grid-template-columns: 22px 1fr 26px 24px 24px 24px 34px 30px;
  align-items: center;
  padding: 0 16px;
}
.league-col-header {
  padding-top: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  z-index: 1;
}
.league-th {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
}
.league-th-name { text-align: left; }
.league-row {
  padding-top: 9px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  transition: background var(--transition);
}
.league-row.is-valhalla {
  background: rgba(245,200,66,0.05);
}
.league-row.zone-champ { border-left-color: var(--accent-blue); }
.league-row.zone-euro  { border-left-color: var(--accent-green); }
.league-row.zone-rel   { border-left-color: var(--accent-red); }
.league-td-pos {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
}
.league-td-name {
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 4px;
}
.is-valhalla .league-td-name { color: var(--accent-gold); font-weight: 700; }
.league-td {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}
.league-td-gd { font-size: 12px; text-align: center; color: var(--text-muted); }
.league-td-gd.pos { color: var(--accent-green); }
.league-td-gd.neg { color: var(--accent-red); }
.league-td-pts {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
}
.league-zone-divider {
  height: 1px;
  background: var(--border-bright);
  margin: 0 16px;
}
.league-legend {
  display: flex;
  gap: 14px;
  padding: 10px 16px 16px;
  flex-wrap: wrap;
}
.league-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-dim);
}
.league-legend-dot {
  width: 10px;
  height: 3px;
  border-radius: 2px;
  flex-shrink: 0;
}
.league-legend-dot.zone-champ { background: var(--accent-blue); }
.league-legend-dot.zone-euro  { background: var(--accent-green); }
.league-legend-dot.zone-rel   { background: var(--accent-red); }

/* --- SQUAD OVERVIEW -------------------------------------- */

.screen-squad {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  padding-top: var(--safe-top);
}
.squad-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.squad-back-btn {
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-muted);
  min-height: var(--tap-min);
  white-space: nowrap;
}
.squad-back-btn:active { background: var(--bg-card-hover); }
.squad-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}
.squad-subtitle {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}
.squad-legend {
  display: flex;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.squad-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-dim);
}
.squad-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}
.squad-legend-dot.stat-str { background: #f56d42; }
.squad-legend-dot.stat-mid { background: var(--accent-blue); }
.squad-legend-dot.stat-def { background: var(--accent-green); }
.squad-legend-dot.stat-gk  { background: var(--accent-purple); }
.squad-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px calc(12px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.squad-group-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 10px 4px 4px;
}
.squad-group-label:first-child { padding-top: 4px; }
.squad-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px 8px;
}
.squad-card.starter {
  border-color: rgba(245,200,66,0.25);
  background: rgba(245,200,66,0.03);
}
.squad-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.squad-starter-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.squad-starter-dot.on  { background: var(--accent-gold); box-shadow: 0 0 4px rgba(245,200,66,0.6); }
.squad-starter-dot.off { background: transparent; }
.squad-card-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.squad-card-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.squad-pos-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.07);
  color: var(--text-muted);
  letter-spacing: 0.03em;
}
.squad-age {
  font-size: 11px;
  color: var(--text-dim);
}
.squad-rating {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-gold);
  min-width: 22px;
  text-align: right;
}
.squad-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.squad-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.squad-stat-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.squad-stat-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.squad-stat-val {
  font-size: 11px;
  font-weight: 700;
}
.squad-stat-val.stat-str { color: #f56d42; }
.squad-stat-val.stat-mid { color: var(--accent-blue); }
.squad-stat-val.stat-def { color: var(--accent-green); }
.squad-stat-val.stat-gk  { color: var(--accent-purple); }
.squad-stat-val.dim      { opacity: 0.3; }
.squad-stat-track {
  height: 3px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
  overflow: hidden;
}
.squad-stat-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}
.squad-stat-fill.stat-str { background: #f56d42; }
.squad-stat-fill.stat-mid { background: var(--accent-blue); }
.squad-stat-fill.stat-def { background: var(--accent-green); }
.squad-stat-fill.stat-gk  { background: var(--accent-purple); }

/* --- SCREEN TABS ----------------------------------------- */

.screen-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.screen-tab-btn {
  flex: 1;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-bright);
  background: transparent;
  color: var(--text-dim);
  min-height: var(--tap-min);
  transition: all var(--transition);
}
.screen-tab-btn.active {
  background: rgba(245,200,66,0.10);
  border-color: rgba(245,200,66,0.30);
  color: var(--accent-gold);
}
.tab-pane {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.tab-pane.hidden { display: none; }

/* --- STATS TABLE ----------------------------------------- */

.stat-table-wrap {
  flex: 1;
  overflow-y: auto;
  padding-bottom: calc(12px + var(--safe-bottom));
}
/* # | Name(1fr) | Pos | GP | G | A | POTM */
.stat-col-header,
.stat-row {
  display: grid;
  grid-template-columns: 24px 1fr 34px 28px 26px 26px 38px;
  align-items: center;
  padding: 0 16px;
}
.stat-col-header {
  padding-top: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  z-index: 1;
}
.stat-th {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
  cursor: pointer;
  user-select: none;
  padding: 3px 0;
  transition: color var(--transition);
  white-space: nowrap;
}
.stat-th.sort-active { color: var(--accent-gold); }
.stat-th-name { text-align: left; }
.stat-row {
  padding-top: 9px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
}
.stat-td-rank {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
}
.stat-td-name {
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 4px;
}
.stat-td-pos {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  text-align: center;
  letter-spacing: 0.02em;
}
.stat-td {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}
.stat-td.highlight {
  font-weight: 700;
  color: var(--text-primary);
}
.stat-td.gold { color: var(--accent-gold); font-weight: 700; }
.stat-empty {
  padding: 40px 24px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- ENDING SCREEN --------------------------------------- */

.screen-ending {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px calc(40px + var(--safe-bottom));
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ending-icon {
  font-size: 64px;
  margin-bottom: 24px;
  animation: float 3s ease-in-out infinite;
}
.ending-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.ending-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 300px;
  margin: 0 auto 32px;
}
.ending-stats {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  width: 100%;
  max-width: 300px;
  margin-bottom: 32px;
  text-align: left;
}
.ending-stats-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.ending-stats-row:last-child { border-bottom: none; }
.ending-stats-label { color: var(--text-muted); }

/* --- SACKING EPILOGUE SCREEN ------------------------------- */

.screen-sacking {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 28px 20px calc(28px + var(--safe-bottom));
  overflow-y: auto;
  background: #0e0e12;
}

.sacking-image {
  width: 100%;
  max-width: 360px;
  border-radius: 12px;
  margin: 16px 0 4px;
  display: block;
}

.sacking-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 12px;
  margin-bottom: 22px;
  flex-shrink: 0;
}

.sacking-letter {
  background: #1a1a22;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 22px 22px;
  width: 100%;
  max-width: 380px;
  margin-bottom: 28px;
  font-family: 'Georgia', serif;
}

.sacking-salutation {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 16px;
}

.sacking-para {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 0 14px;
}

.sacking-para:last-of-type {
  margin-bottom: 24px;
}

.sacking-signoff {
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
  margin: 0 0 6px;
}

.sacking-sig {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 2px;
  font-family: 'Georgia', serif;
}

.sacking-sig-role {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  margin: 0;
}

.sacking-play-again {
  max-width: 300px;
  width: 100%;
  flex-shrink: 0;
}

/* --- CUPS SCREEN ------------------------------------------- */

.screen-cups {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
  overflow: hidden;
}
.cups-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 10px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cups-back-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-gold);
  white-space: nowrap;
}
.cups-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.cups-tabs {
  display: flex;
  gap: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cups-tab {
  flex: 1;
  padding: 10px 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  text-align: center;
  transition: color 0.15s, border-color 0.15s;
}
.cups-tab.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}
.cups-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px calc(20px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cups-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 40px 20px;
}
.cups-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.cups-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 12px 6px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.cups-round-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 10px;
}
.badge-draw    { background: rgba(255,190,50,0.15); color: var(--accent-gold); border: 1px solid rgba(255,190,50,0.3); }
.badge-results { background: rgba(61,220,132,0.12); color: var(--accent-green); border: 1px solid rgba(61,220,132,0.25); }

/* Result badge tooltip */
.badge[data-tooltip] {
  position: relative;
  cursor: default;
}
.badge[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  padding: 4px 9px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
  z-index: 200;
  letter-spacing: 0;
  text-transform: none;
}
.badge[data-tooltip]:hover::after,
.badge[data-tooltip].tooltip-active::after {
  opacity: 1;
}

.cups-match {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.cups-match:last-of-type { border-bottom: none; }
.cups-valhalla {
  background: rgba(212,175,55,0.04);
  border-left: 3px solid var(--accent-gold);
}
.cups-team {
  flex: 1;
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cups-team:last-child { text-align: right; }
.cups-team-us  { color: var(--text-primary); font-weight: 700; }
.cups-team-won { color: var(--text-primary); font-weight: 700; }
.cups-score {
  flex-shrink: 0;
  min-width: 44px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.cups-score-vs {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
}
/* CWC match rows with flags */
.cwc-match {
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
}
.cwc-team {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.cwc-team:last-child {
  flex-direction: row-reverse;
  text-align: right;
}
.cwc-team-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cwc-team-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cwc-team.cups-team-us .cwc-team-name  { color: var(--text-primary); }
.cwc-team.cups-team-won .cwc-team-name { color: var(--text-primary); font-weight: 700; }
.cwc-team-nation {
  font-size: 10px;
  color: var(--text-dim);
}
.cwc-flag {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
}
.cwc-score {
  flex-shrink: 0;
  min-width: 44px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.cwc-score-vs {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
}

.cups-trophy-header {
  display: flex;
  justify-content: center;
  padding: 4px 0 8px;
}
.cups-qual-info {
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
  padding: 6px 12px 8px;
  border-top: 1px solid var(--border);
  letter-spacing: 0.03em;
}
.cups-eliminated {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(224,64,32,0.08);
  border: 1px solid rgba(224,64,32,0.3);
  border-radius: var(--radius-sm);
  color: var(--accent-red);
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}
.elim-icon { font-size: 14px; }

/* Champions Cup group table */
.cups-group-table {
  margin: 6px 12px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: 11px;
}
.cups-group-hdr,
.cups-group-row {
  display: grid;
  grid-template-columns: 1fr 22px 22px 22px 22px 30px 30px;
  gap: 0;
  padding: 5px 8px;
  align-items: center;
}
.cups-group-hdr {
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cups-group-hdr span, .cups-group-row span { text-align: center; }
.cups-group-hdr .cups-g-name, .cups-group-row .cups-g-name { text-align: left; }
.cups-group-row {
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.cups-group-row:last-child { border-bottom: none; }
.cups-group-row .bold { font-weight: 700; color: var(--text-primary); }
.cups-group-us   { color: var(--text-primary); font-weight: 700; }
.cups-group-qualify { border-left: 2px solid var(--accent-blue); }
.cups-g-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.ending-stats-val { color: var(--text-primary); font-weight: 600; }

/* --- TROPHY IMAGES ---------------------------------------- */

.trophy-icon {
  display: inline-block;
  flex-shrink: 0;
  object-fit: contain;
}
.trophy-xs { height: 30px; width: auto; }
.trophy-sm { height: 52px; width: auto; }
.trophy-md { height: 87px; width: auto; }

/* --- INTRO VIDEO ------------------------------------------ */

.intro-overlay {
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.4s ease;
}
.intro-overlay.intro-fade-out {
  opacity: 0;
  pointer-events: none;
}
.intro-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.intro-tap-prompt {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.85);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  animation: tap-pulse 1.4s ease-in-out infinite;
}
@keyframes tap-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
.intro-skip {
  position: absolute;
  bottom: calc(20px + env(safe-area-inset-bottom));
  right: 20px;
  padding: 8px 18px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

/* ============================================================
   TRANSITION SCREEN
   ============================================================ */

.screen-transition {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #05060f 0%, #0a0c1a 50%, #070810 100%);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  padding: 48px 32px calc(48px + var(--safe-bottom));
}

/* Subtle vignette overlay */
.screen-transition::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, transparent 40%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}

/* Decorative gold accent line at top */
.transition-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-gold) 30%, var(--accent-gold) 70%, transparent 100%);
  opacity: 0.6;
}

.transition-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 340px;
  text-align: center;
}

.transition-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 12px rgba(245, 200, 66, 0.45));
}

.transition-win-img-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.transition-win-img {
  width: 220px;
  max-width: 80%;
  height: auto;
  border-radius: 12px;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.6));
}

.transition-location {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-gold);
  opacity: 0.85;
  margin-bottom: 14px;
}

.transition-rule {
  width: 40px;
  height: 1px;
  background: rgba(245, 200, 66, 0.35);
  margin: 0 auto 28px;
}

.transition-text {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.75;
  color: rgba(240, 240, 240, 0.88);
  font-style: italic;
  letter-spacing: 0.01em;
}

.transition-hint {
  position: absolute;
  bottom: calc(32px + var(--safe-bottom));
  left: 0; right: 0;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  animation: transition-hint-pulse 2.4s ease-in-out infinite;
}

@keyframes transition-hint-pulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 0.9; }
}

/* ============================================================
   PLAYER OF THE MATCH — match screen section
   ============================================================ */

.match-potm {
  margin: 16px 0 4px;
  padding: 14px 16px;
  background: rgba(245, 200, 66, 0.07);
  border: 1px solid rgba(245, 200, 66, 0.25);
  border-radius: var(--radius-md);
  text-align: center;
}
.match-potm.opponent {
  background: rgba(180, 180, 200, 0.06);
  border-color: rgba(180, 180, 200, 0.20);
}
.match-potm.opponent .match-potm-label { color: var(--text-muted); }
.match-potm.opponent .match-potm-name  { color: var(--text-primary); }
.match-potm-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 6px;
}
.match-potm-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.match-potm-detail {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   PLAYER TAG — tappable name highlight in match report/timeline
   ============================================================ */

.player-tag {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 700;
  color: var(--accent-gold);
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  -webkit-tap-highlight-color: transparent;
}
.player-tag:active { opacity: 0.7; }

/* ============================================================
   PLAYER CARD OVERLAY — shown when a player name is tapped
   ============================================================ */

.player-card-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.player-card-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 340px;
  padding: 18px 20px 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}
.pc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.pc-pos-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-gold);
  background: rgba(245, 200, 66, 0.12);
  border: 1px solid rgba(245, 200, 66, 0.4);
  border-radius: 4px;
  padding: 3px 8px;
}
.pc-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  border-radius: 4px;
}
.pc-close:active { background: var(--bg-card-hover); }
.pc-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 5px;
  line-height: 1.2;
}
.pc-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.pc-rating {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-gold);
}
.pc-age {
  font-size: 13px;
  color: var(--text-muted);
}
.pc-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-bottom: 12px;
}
.pc-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.pc-stat-cell {
  text-align: center;
  background: var(--bg-screen);
  border-radius: var(--radius-sm);
  padding: 10px 4px 8px;
}
.pc-stat-val {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.pc-stat-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================================
   PLAYER MOMENT SCREEN — post-match character splash
   ============================================================ */

.screen-player-moment {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #07080f 0%, #0d0f1a 55%, #0a0c18 100%);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

/* Subtle character-colour glow behind the portrait */
.screen-player-moment::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 70%;
  background: radial-gradient(ellipse at 50% 10%, color-mix(in srgb, var(--char-color) 14%, transparent) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* Portrait fills all space above the info card, same as scene-portrait-area */
.player-moment-portrait {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 8px 32px rgba(0,0,0,0.6));
}
.player-moment-portrait img,
.player-moment-portrait svg {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: bottom center;
  display: block;
}

/* Info card sits at the bottom, never shrinks */
.player-moment-card {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 20px 28px calc(32px + var(--safe-bottom));
  text-align: center;
  background: linear-gradient(to top, rgba(7,8,15,0.96) 60%, transparent);
}

.player-moment-achievement {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--char-color, var(--accent-gold));
  opacity: 0.9;
  margin-bottom: 6px;
}

.player-moment-headline {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 12px;
}

.player-moment-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

.player-moment-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(240, 240, 240, 0.85);
}


/* ══════════════════════════════════════════════════════════════
   LEAGUE ROUNDS SCREEN — Between-match simulation summary
   ══════════════════════════════════════════════════════════════ */

.screen-league-rounds {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: var(--bg-primary);
  padding-top: calc(var(--safe-top) + 44px);
  overflow: hidden;
  position: relative;
}

.lr-header {
  padding: 0 20px 14px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.lr-comp-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 4px;
}

.lr-round-label {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.lr-results {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  min-height: 0;
}

.lr-result-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 6px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border-left: 3px solid transparent;
}

.lr-result-row.win  { border-left-color: #4caf80; }
.lr-result-row.draw { border-left-color: var(--accent-gold); }
.lr-result-row.loss { border-left-color: #e05252; }

.lr-result-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.lr-result-badge.win  { background: rgba(76,175,128,0.15); color: #4caf80; }
.lr-result-badge.draw { background: rgba(245,200,66,0.12);  color: var(--accent-gold); }
.lr-result-badge.loss { background: rgba(224,82,82,0.12);   color: #e05252; }

.lr-result-info {
  flex: 1;
  min-width: 0;
}

.lr-result-opp {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

.lr-result-score {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.lr-summary {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.lr-record {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.lr-rec-w { color: #4caf80; }
.lr-rec-d { color: var(--accent-gold); }
.lr-rec-l { color: #e05252; }

.lr-narrative {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
  font-style: italic;
}

.lr-footer {
  padding: 10px 20px calc(var(--safe-bottom) + 10px);
  flex-shrink: 0;
}

/* Sequential reveal */
.lr-hint-hidden { visibility: hidden; pointer-events: none; }

@keyframes lr-row-slide-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes lr-playing-pulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1;   }
}

.lr-row-enter {
  animation: lr-row-slide-in 0.3s ease both;
}
.lr-row-reveal {
  animation: lr-row-slide-in 0.25s ease both;
}

/* "Playing" placeholder row */
.lr-result-row.lr-row-playing {
  border-left-color: var(--text-dim);
  opacity: 0.75;
}
.lr-badge-playing {
  background: rgba(255,255,255,0.06);
  color: var(--text-dim);
  animation: lr-playing-pulse 1s ease-in-out infinite;
  font-size: 14px;
}
.lr-playing-status {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  margin-top: 2px;
  animation: lr-playing-pulse 1s ease-in-out infinite;
}
.lr-score-playing {
  color: var(--text-dim);
  animation: lr-playing-pulse 1s ease-in-out infinite;
}

/* Tappable result rows */
.lr-result-tappable { cursor: pointer; }
.lr-result-tappable:active { opacity: 0.75; }
.lr-result-tap-hint {
  font-size: 10px;
  color: var(--accent-gold);
  opacity: 0.6;
  margin-top: 2px;
  letter-spacing: 0.04em;
}

/* Match detail modal */
.lr-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.lr-detail-modal {
  width: 100%;
  max-height: 80%;
  background: var(--bg-card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 0 0 calc(16px + var(--safe-bottom));
  overflow-y: auto;
}
.lr-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--border);
}
.lr-detail-round {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.lr-detail-close {
  font-size: 16px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 8px;
}
.lr-detail-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 18px 14px;
}
.lr-detail-team {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  line-height: 1.3;
}
.lr-detail-team:last-child { text-align: right; }
.lr-detail-team-us { color: var(--text-primary); }
.lr-detail-score {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  flex-shrink: 0;
  padding: 0 10px;
}
.lr-detail-score.win  { color: #4caf80; }
.lr-detail-score.draw { color: var(--accent-gold); }
.lr-detail-score.loss { color: #e05252; }
.lr-detail-divider {
  height: 1px;
  background: var(--border);
  margin: 0 18px;
}
.lr-detail-events {
  padding: 10px 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.lr-detail-event {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.lr-detail-minute {
  font-size: 11px;
  color: var(--text-dim);
  min-width: 28px;
  font-weight: 600;
}
.lr-detail-icon { font-size: 13px; }
.lr-detail-event-text {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}
.lr-detail-event-opp .lr-detail-event-text { color: var(--text-dim); }
.lr-assist {
  color: var(--text-dim);
  font-weight: 400;
}
.lr-opp-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  opacity: 0.7;
  margin-left: 2px;
}
.lr-detail-no-goals {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  padding: 6px 0;
}
.lr-detail-opp-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 6px;
  margin-bottom: 2px;
}
.lr-detail-potm {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
}
.lr-detail-potm-star { font-size: 16px; }
.lr-detail-potm-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.lr-detail-potm-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-left: 2px;
}


/* ══════════════════════════════════════════════════════════════
   CUP ROUNDS SCREEN — Other teams' results before a cup match
   ══════════════════════════════════════════════════════════════ */

.screen-cup-rounds {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: var(--bg-primary);
  padding-top: calc(var(--safe-top) + 44px);
  overflow: hidden;
}

.cr-header {
  padding: 0 20px 14px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.cr-comp-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 4px;
}

.cr-round-label {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.cr-content {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  min-height: 0;
}

/* ── Match rows ─────────────────────────────────────────────── */

.cr-match-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  margin-bottom: 6px;
  border-radius: var(--radius);
  background: var(--bg-card);
}

/* Standard (FA / Champions Cup) */
.cr-team {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cr-team.right { text-align: right; }
.cr-team.cr-winner { color: var(--text-primary); font-weight: 700; }
.cr-team.cr-loser  { color: var(--text-dim); }

.cr-score {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  flex-shrink: 0;
  min-width: 42px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* CWC (flag + nation layout) */
.cr-team-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.cr-team-cell.right { flex-direction: row-reverse; }
.cr-team-cell.cr-winner .cr-name { color: var(--text-primary); font-weight: 700; }
.cr-team-cell.cr-loser  .cr-name { color: var(--text-dim); }

.cr-flag { font-size: 16px; flex-shrink: 0; }
.cr-flag-img { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; flex-shrink: 0; }

.cr-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Group table (Champions Cup group mode) ─────────────────── */

.cr-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.cr-group-table {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}

.cr-group-hdr,
.cr-group-row {
  display: grid;
  grid-template-columns: 1fr 24px 24px 24px 24px 28px;
  gap: 0;
  padding: 7px 10px;
  font-size: 12px;
}

.cr-group-hdr {
  color: var(--text-dim);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.cr-group-hdr span,
.cr-group-row span { text-align: right; }

.cr-group-hdr .cr-g-name,
.cr-group-row .cr-g-name { text-align: left; display: flex; align-items: center; gap: 5px; }

.cr-group-row { color: var(--text-secondary); }
.cr-group-row .bold { color: var(--text-primary); font-weight: 700; }
.cr-group-qualify { color: var(--text-primary); }
.cr-group-qualify::after { content: ''; }

/* ── Narrative + footer ─────────────────────────────────────── */

.cr-narrative {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  font-style: italic;
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.cr-footer {
  padding: 10px 20px calc(var(--safe-bottom) + 10px);
  flex-shrink: 0;
}


/* ── AET / Penalties scoreboard badge ────────────────────────── */

.sb-method-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent-gold);
  opacity: 0.85;
  margin-top: 2px;
  text-align: center;
  white-space: nowrap;
}

/* Penalty shootout timeline row */
.match-tl-row.penalties {
  border-left: 2px solid var(--accent-gold);
  background: rgba(245,200,66,0.05);
}


/* ============================================================
   KNOCKOUT TRANSITION SCREEN
   ============================================================ */

.screen-knockout-transition {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 28px calc(40px + var(--safe-bottom));
  background: linear-gradient(180deg, #0d0a0a 0%, #180c0c 50%, #0d0d0d 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.kt-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
  filter: grayscale(0.4);
}

.kt-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.kt-round {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-red);
  letter-spacing: 0.04em;
  margin-bottom: 28px;
}

.kt-lines {
  max-width: 320px;
  margin: 0 auto 32px;
}

.kt-line {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.kt-line:last-child { margin-bottom: 0; }

.kt-footer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 12px 24px calc(var(--safe-bottom) + 12px);
}


/* ============================================================
   SEASON SUMMARY SCREEN
   ============================================================ */

.screen-season-summary {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary, #0a0a12);
  overflow: hidden;
}

.ss-header {
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(245,200,66,0.06) 0%, transparent 100%);
}

.ss-header-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.ss-header-sub {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 2px;
}

.ss-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ss-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.ss-block-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}

/* League position */

.ss-position-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.ss-pos-num {
  font-size: 36px;
  font-weight: 800;
  color: var(--accent-gold, #f5c842);
  line-height: 1;
}

.ss-pos-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* W/D/L/Pts record */

.ss-record-row {
  display: flex;
  gap: 8px;
}

.ss-record-cell {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 8px 4px;
  text-align: center;
}

.ss-record-num {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 3px;
}

.ss-record-num.win  { color: var(--accent-green); }
.ss-record-num.draw { color: var(--text-dim); }
.ss-record-num.loss { color: var(--accent-red); }
.ss-record-num.pts  { color: var(--accent-gold, #f5c842); }

.ss-record-lbl {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Cup rows */

.ss-cup-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.ss-cup-row:last-child { border-bottom: none; }

.ss-cup-icon { font-size: 16px; width: 22px; text-align: center; }

.ss-cup-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.ss-cup-result {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
}

.ss-cup-result.winner { color: var(--accent-gold, #f5c842); }
.ss-cup-result.none   { color: var(--text-dim); opacity: 0.5; }

/* Top scorers */

.ss-scorer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}

.ss-scorer-row:last-child { border-bottom: none; }

.ss-scorer-rank {
  font-size: 11px;
  color: var(--text-dim);
  width: 16px;
  flex-shrink: 0;
}

.ss-scorer-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.ss-scorer-goals {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-gold, #f5c842);
}

.ss-footer {
  padding: 12px 20px calc(var(--safe-bottom, 0px) + 12px);
  flex-shrink: 0;
  border-top: 1px solid var(--border);
}
