/* Home page pre-scout rail (js/prescout-rail.js), prescoutRail permission.
   Cards are Scores' .lg-game-card pre-scout look, plus a strip saying which
   of our games each letter is for. */
.prescout-rail {
  width: 300px; min-width: 300px; flex-shrink: 0;
  background: var(--surface); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; min-height: 0;
}
.prescout-rail[hidden] { display: none; }
.psr-head { padding: 0.9rem 0.7rem 0.7rem 1rem; border-bottom: 1px solid var(--border); flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }

/* Minimize / expand: the rail slides to a 30px strip and back. */
.prescout-rail { transition: width 0.2s ease, min-width 0.2s ease; overflow: hidden; }
.psr-toggle {
  border: 1px solid var(--border); background: var(--surface); color: var(--text2);
  border-radius: 6px; cursor: pointer; font: inherit; line-height: 1;
}
.psr-toggle:hover { color: var(--text); border-color: var(--text3); }
.psr-collapse { width: 24px; height: 24px; font-size: 1.05rem; flex: none; padding: 0 0 2px; }
.psr-actions { display: flex; gap: 0.3rem; flex: none; }
.psr-gear {
  width: 24px; height: 24px; flex: none; padding: 0; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--text2); border-radius: 6px; cursor: pointer;
}
.psr-gear:hover { color: var(--text); border-color: var(--text3); }

/* Settings popover (on <body>, placed under the gear in page coordinates,
   so it scrolls with the page on a phone). */
.psr-settings {
  position: absolute; z-index: 260; width: 230px; max-width: calc(100vw - 16px); box-sizing: border-box;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18); padding: 0.75rem 0.85rem; font-size: 0.8rem; color: var(--text);
}
.psr-set-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.55rem; }
.psr-set-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.45rem; }
.psr-set-row input {
  width: 4rem; padding: 0.25rem 0.4rem; font: inherit; text-align: center;
  border: 1px solid var(--border); border-radius: 6px; background: var(--surface2); color: var(--text);
}
.psr-set-hint { font-size: 0.72rem; color: var(--text2); margin-top: 0.1rem; }
.psr-set-err { font-size: 0.72rem; color: #c0392b; min-height: 0; }
.psr-set-err:not(:empty) { margin-top: 0.3rem; }
.psr-set-btns { display: flex; justify-content: flex-end; gap: 0.4rem; margin-top: 0.6rem; }
.psr-set-btns button {
  font: inherit; font-size: 0.76rem; padding: 0.3rem 0.7rem; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.psr-set-btns .psr-set-save { background: #041e42; border-color: #041e42; color: #fff; }
.psr-set-note { font-size: 0.66rem; color: var(--text3); margin-top: 0.5rem; }
.psr-expand { display: none; }
.prescout-rail.psr-collapsed { width: 30px; min-width: 30px; }
.prescout-rail.psr-collapsed > .psr-head,
.prescout-rail.psr-collapsed > .psr-body { display: none; }
.prescout-rail.psr-collapsed > .psr-expand {
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  flex: 1; width: 100%; border: none; border-radius: 0; padding: 0.7rem 0;
  font-size: 1.05rem; background: transparent;
}
.prescout-rail.psr-collapsed > .psr-expand:hover { background: var(--surface2, rgba(0,0,0,0.04)); }
.psr-expand span {
  writing-mode: vertical-rl; font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.psr-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text); }
.psr-range { font-size: 0.7rem; color: var(--text3); margin-top: 0.15rem; }
.psr-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0.3rem 0.8rem 1rem; }
.psr-msg { padding: 1.5rem 0; text-align: center; font-size: 0.78rem; color: var(--text3); }

.psr-day { margin-top: 0.6rem; }
.psr-day-h { display: flex; align-items: baseline; gap: 0.5rem; font-size: 0.74rem; font-weight: 700; color: var(--text); padding: 0.2rem 0.1rem 0.35rem; }
.psr-n { font-weight: 500; color: var(--text3); font-size: 0.68rem; }
.psr-empty .psr-day-h { color: var(--text3); font-weight: 600; }
.psr-today-tag { font-size: 0.6rem; font-weight: 700; color: #1a1a18; background: rgba(0,0,0,0.08); border-radius: 3px; padding: 0.05rem 0.3rem; }
.psr-day.psr-today .psr-day-h { background: #ffe680; color: #1a1a18; border-radius: 6px; padding: 0.3rem 0.5rem; margin: 0 -0.1rem 0.35rem; }
.psr-day.psr-today .psr-n { color: #5c5000; }

.psr-card {
  background: var(--surface); border: 1px solid rgba(252,76,2,0.55); border-radius: 10px;
  overflow: hidden; margin-bottom: 0.55rem; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(252,76,2,0.25), 0 0 10px 1px rgba(252,76,2,0.35);
  transition: box-shadow 0.15s;
}
.psr-card:hover { box-shadow: 0 0 0 1px rgba(252,76,2,0.3), 0 0 14px 2px rgba(252,76,2,0.45); }
.psr-tag {
  height: 18px; line-height: 18px; padding: 0 0.6rem;
  font-size: 0.64rem; font-weight: 700; letter-spacing: 0.04em; color: #c43c00;
  background: rgba(252,76,2,0.08); border-bottom: 1px solid rgba(252,76,2,0.25);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Our own game: Oilers blue, as on Scores. */
.psr-card.psr-ours { border-color: #041e42; box-shadow: 0 0 0 1px rgba(4,30,66,0.45), 0 0 11px 2px rgba(4,30,66,0.55); }
.psr-card.psr-ours:hover { box-shadow: 0 0 0 1px rgba(4,30,66,0.5), 0 0 15px 3px rgba(4,30,66,0.6); }
.psr-card.psr-ours .psr-tag { color: #041e42; background: rgba(4,30,66,0.1); border-bottom-color: rgba(4,30,66,0.35); }

.psr-inner { padding: 0.35rem 0.6rem 0; }
.psr-team { display: flex; align-items: center; gap: 0.4rem; padding: 0.25rem 0; border-bottom: 1px solid var(--border); }
.psr-logo, .psr-logo-sm { display: inline-block; flex-shrink: 0; background-size: contain; background-repeat: no-repeat; background-position: center; }
.psr-logo { width: 18px; height: 18px; }
.psr-logo-sm { width: 14px; height: 14px; }
.psr-name { flex: 1; min-width: 0; font-size: 0.76rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psr-score { font-size: 0.8rem; font-weight: 700; color: var(--text3); min-width: 1.2rem; text-align: right; }
.psr-team.psr-won .psr-name, .psr-team.psr-won .psr-score { color: #000; }
.psr-team.psr-lost .psr-name, .psr-team.psr-lost .psr-score { opacity: 0.5; }
.psr-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; padding: 0.3rem 0 0.35rem; font-size: 0.68rem; color: var(--text2); }
.psr-live { color: #c00; font-weight: 700; }
.psr-links { display: flex; gap: 0.25rem; flex-wrap: wrap; justify-content: flex-end; }

.psr-for { border-top: 1px solid var(--border); background: var(--surface2); padding: 0.3rem 0.6rem 0.35rem; display: flex; flex-direction: column; gap: 0.2rem; }
.psr-for-row { display: grid; grid-template-columns: 26px 58px 1fr auto; align-items: center; gap: 0.4rem; font-size: 0.7rem; }
.psr-letter { font-weight: 700; color: #fff; background: #c43c00; border-radius: 4px; text-align: center; font-size: 0.66rem; line-height: 16px; }
.psr-ours .psr-letter { background: #041e42; }
.psr-gm { font-weight: 700; color: var(--text); }
.psr-when { color: var(--text2); }
.psr-vs { display: flex; align-items: center; gap: 0.25rem; font-weight: 600; color: var(--text); }
