/* The paper rail carries venue information. Calls sit directly on the moving picture. */
.app-shell:not(.market-round) {
  --cast-ink: #20382e;
  --cast-secondary: #394e44;
  --cast-pick: #6b4020;
  --cast-paper: rgba(251, 251, 242, .96);
  --cast-subtitle: rgba(17, 35, 39, .89);
  --cast-white: #fffdf3;
}
.app-shell:not(.market-round) :is(.brand, .brand-mark, :where(.header-actions) .icon-button, .level-button, .wallet,
    .condition, .live-round-band) {
  color: var(--cast-ink);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.app-shell:not(.market-round) .brand { font-weight: 650; letter-spacing: .025em; }
.app-shell:not(.market-round) .brand-mark svg { fill: currentColor; }
.app-shell:not(.market-round) .wallet { font-weight: 600; font-variant-numeric: tabular-nums; }
.app-shell:not(.market-round) .wallet .coin {
  width: 14px; height: 14px; border: 1.5px solid #795b27; outline: 0;
  background: transparent; color: #795b27; font-size: 0;
}
.app-shell:not(.market-round) .wallet .coin::before {
  content: ''; width: 2px; height: 5px; border-radius: 1px; background: currentColor;
}
.app-shell:not(.market-round) :is(.round-phase strong, .race-type, .pregame-hud strong) {
  color: var(--cast-ink); font-weight: 600;
}
.app-shell:not(.market-round) :is(.live-round-band .round-phase > span, .condition,
    .pregame-hud > span) {
  color: var(--cast-secondary); font-weight: 450;
}
.app-shell:not(.market-round) :is(.topbar, .stage) :is(button, a):focus-visible {
  outline: 2px solid #1c5a59; outline-offset: -2px;
}
/* A caption backing follows each line, so the spaces around the text remain open. */
.app-shell:not(.market-round) .live-caption {
  color: var(--cast-white);
  text-shadow: none;
  font-size: 14px;
  line-height: 1.42;
}
.app-shell:not(.market-round) .live-caption .commentary-line {
  width: fit-content;
  max-width: 100%;
  margin-bottom: 2px;
  padding: 0 6px;
  border-radius: 3px;
  background: var(--cast-subtitle);
  color: #edf2ed;
  font-weight: 550;
}
.app-shell:not(.market-round) .live-caption .is-latest {
  color: var(--cast-white);
  font-weight: 750;
}
.app-shell:not(.market-round) :is(.broadcast-hud > span, .scene-replay-caption, .contest-goal) {
  background: var(--cast-paper);
  color: var(--cast-ink);
  font-size: 12px;
  font-weight: 650;
  border-radius: 6px;
}
.app-shell:not(.market-round) .pregame-hud {
  width: fit-content;
  background: var(--cast-paper);
}
.app-shell:not(.market-round) .pregame-hud :is(span, strong) { color: var(--cast-ink); }
.app-shell:not(.market-round) .team-scoreboard {
  background: var(--cast-paper);
  color: var(--cast-ink);
  border-radius: 9px;
  text-shadow: none;
}
.app-shell:not(.market-round) :is(.team-scoreboard > strong > i,
    .team-scoreboard.has-period > strong > small, .ice-scoreboard .team-score-side > small) {
  color: var(--cast-secondary);
}
.app-shell:not(.market-round) :is(.team-score-side.picked b, .team-score-side em) { color: var(--cast-pick); }
.app-shell:not(.market-round) :is(.live-standings, .individual-scoreboard) {
  color: var(--cast-white);
  font-weight: 700;
  -webkit-text-stroke: 2.4px #172c30;
  paint-order: stroke fill;
  text-shadow: 0 1px 2px #172c30;
}
.app-shell:not(.market-round) :is(.live-standings > li > b, .live-standings > li.eliminated,
    .individual-scoreboard li > small, .individual-scoreboard li > b) { color: var(--cast-white); }
.app-shell:not(.market-round) .live-standings > li > small { opacity: 1; }
.app-shell:not(.market-round) :is(.live-standings > li:first-child > b, .live-standings > li.picked,
    .individual-scoreboard .picked) { color: #ffe9a5; }
.app-shell .broadcast-hud {
  z-index: 12;
  align-items: center;
  gap: 6px;
}
#broadcast-shot {
  min-width: 0;
  flex: 0 1 auto;
}
.stage-tools {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
  margin-inline-start: auto;
}
.camera-modes, .stage-roster {
  border: 1px solid #264a3840;
  border-radius: 14px;
  background: #fbfcf2f2;
  box-shadow: 0 2px 6px #172b2321;
}
.camera-modes {
  display: flex;
  align-items: center;
  padding: 2px;
}
.stage-tools button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  color: #344c41;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.15;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}
.stage-tools [hidden], #broadcast-shot[hidden] { display: none; }
.stage-tools svg {
  width: 19px;
  height: 19px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.camera-modes button { border: 0; border-radius: 11px; background: transparent; }
.camera-modes button[aria-pressed="true"] {
  background: #284d40;
  color: #fffef3;
  font-weight: 750;
}
.stage-tools .stage-roster { min-height: 48px; }
.app-shell .stage .stage-tools button:focus-visible {
  outline: 2px solid #aa631a;
  outline-offset: -3px;
}
.app-shell .stage .camera-modes button[aria-pressed="true"]:focus-visible { outline-color: #ffe28a; }
@media (hover: hover) {
  .camera-modes button[aria-pressed="false"]:hover, .stage-tools .stage-roster:hover { background: #e7eddf; }
}
@media (max-width: 430px) {
  .stage-tools button { flex-direction: column; gap: 2px; padding-inline: 5px; }
}
@media (forced-colors: active) {
  .camera-modes button[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -3px; }
}
.app-shell:not(.market-round) .team-score-side em { border: 0; padding: 0; }
.app-shell:not(.market-round) .team-scoreboard > strong { font-weight: 650; }
.app-shell:not(.market-round) #observed-match {
  color: var(--cast-ink); background: var(--cast-paper); border: 0; box-shadow: none;
}
.app-shell:not(.market-round) #observed-match strong { color: inherit; font-weight: 600; }
.app-shell .arena-top .race-period { color: var(--cast-secondary); font-size: 11px; font-weight: 500; white-space: nowrap; }
.app-shell .race-period:empty { display: none; }
@media (max-width: 800px) {
  .app-shell:not(.market-round) .stage::after {
    background: linear-gradient(to top, #16312845, transparent 145px);
  }
  /* Keep one quiet edge at the top of the broadcast. Its height includes the
     notch so the controls retain their hit areas on full-screen phones. */
  .app-shell:not(.market-round) .topbar {
    --mast-height: 48px;
    inset: 0 0 auto;
    box-sizing: border-box;
    height: calc(var(--arena-safe-top) + var(--mast-height));
    min-height: 0;
    padding: var(--arena-safe-top) calc(var(--arena-safe-right) + 4px) 0 calc(var(--arena-safe-left) + 4px);
    background: rgba(249, 248, 237, .78);
    border-bottom: 1px solid rgba(48, 62, 47, .14);
  }
  .app-shell:not(.market-round) .brand { gap: 5px; padding: 0; font-size: 13px; }
  .app-shell:not(.market-round) .brand-mark { width: 22px; height: 24px; }
  .app-shell:not(.market-round) .header-actions { gap: 1px; }
  .app-shell:not(.market-round) .header-actions button { min-width: 44px; min-height: 44px; }
  .app-shell:not(.market-round) .header-actions .icon-button svg { width: 17px; }
  .app-shell:not(.market-round) .wallet { padding-inline: 6px 0; }
  .app-shell:not(.market-round) :is(.arena-top, .live-round-band) {
    top: calc(var(--arena-safe-top) + 54px);
  }
  .app-shell:not(.market-round) .arena-top {
    padding-inline: 8px;
    gap: 7px;
    min-width: 0;
    background: var(--cast-paper);
    border-radius: 7px;
  }
  .app-shell:not(.market-round) .race-type { margin: 0; font-size: 16px; font-weight: 750; letter-spacing: .015em; }
  .app-shell:not(.market-round) .condition { padding: 0; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
  .app-shell:not(.market-round) .condition:empty { display: none; }
  .app-shell:not(.market-round) .live-round-band { padding-inline: 0; }
  .app-shell:not(.market-round) .round-phase {
    height: 32px;
    padding: 0 8px;
    background: var(--cast-paper);
    border-radius: 7px;
  }
  .app-shell:not(.market-round) .round-phase > span { font-size: 12px; font-weight: 600; }
  .app-shell:not(.market-round) .team-scoreboard.has-period > strong > small,
  .app-shell:not(.market-round) .ice-scoreboard .team-score-side > small { font-size: 11px; }

  .app-shell:not(.market-round) .round-phase > strong { font-size: 18px; font-variant-numeric: tabular-nums; }
  .app-shell:not(.market-round) :is(.pregame-hud, .contest-goal, .scene-replay-caption) {
    padding-inline: 8px;
  }
  .app-shell:not(.market-round) .broadcast-hud > span { padding: 3px 7px; }
  .app-shell:not(.market-round) .live-caption { padding: 5px 0 0; }
  .app-shell:not(.market-round) .live-caption .is-leaving { left: 0; right: auto; }
  .app-shell:not(.market-round) .live-standings:has(small) > li > small { margin-left: 3px; }
}

@media (max-width: 800px) and (max-height: 500px) and (orientation: landscape) {
  .app-shell:not(.market-round) .topbar { --mast-height: 44px; }
  .app-shell:not(.market-round) :is(.arena-top, .live-round-band) { top: calc(var(--arena-safe-top) + 48px); }
}

#last-ticket-receipt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid #d8e3d4;
  border-radius: 7px;
  background: #f5f7ee;
  color: #2f4a3a;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#last-ticket-receipt[hidden], .receipt-placement:empty { display: none; }
#last-ticket-receipt:hover { background: #ecf2e7; }
#last-ticket-receipt:focus-visible { outline: 2px solid #1c5a59; outline-offset: -2px; }
.receipt-pick { overflow: hidden; text-overflow: ellipsis; }
.receipt-prefix, .receipt-placement, .receipt-xp { color: #405a4b; }
.receipt-net, .ticket-receipt-totals dd { color: #286043; font-weight: 700; }
.receipt-net.loss, .ticket-receipt-totals dd.loss { color: #963f37; }
.ticket-receipt-totals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.ticket-receipt-totals > div {
  padding: 10px 12px;
  border: 1px solid #d8e3d4;
  border-radius: 8px;
  background: #f5f7ee;
}
.ticket-receipt-totals dt { color: #405a4b; font-size: 12px; }
.ticket-receipt-totals dd { margin: 3px 0 0; font-size: 15px; overflow-wrap: anywhere; }
.ticket-receipt-choices { margin: 8px 0 0; padding: 0; list-style: none; }
.ticket-receipt-choices li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid #d8e3d4;
  font-size: 13px;
}
.ticket-receipt-choices small { color: #405a4b; }

@media (max-width: 800px) {
  .app-shell:has(#last-ticket-receipt:not([hidden])) {
    --receipt-title-width: clamp(85px, 25vw, 210px);
  }
  .app-shell:has(#last-ticket-receipt:not([hidden])) .arena-top {
    max-width: var(--receipt-title-width);
    white-space: nowrap;
  }
  .app-shell .live-round-band:has(#last-ticket-receipt:not([hidden])) {
    left: calc(var(--arena-safe-left) + var(--receipt-title-width) + 3px);
    justify-content: flex-end;
    padding: 0;
    gap: 4px;
    pointer-events: none;
  }
  #last-ticket-receipt {
    min-height: 44px;
    padding: 0 5px;
    border-color: transparent;
    position: relative;
    isolation: isolate;
    background: transparent;
    font-size: 11px;
    gap: 3px;
    pointer-events: auto;
  }
  #last-ticket-receipt::before {
    content: '';
    position: absolute;
    inset: 6px 0;
    z-index: -1;
    border-radius: 6px;
    background: var(--cast-paper, #fafaf2);
  }
  .app-shell.ticket-open #last-ticket-receipt { pointer-events: none; }
}
@media (max-width: 520px) {
  .app-shell:has(#last-ticket-receipt:not([hidden])) {
    --receipt-title-width: clamp(150px, 43vw, 200px);
  }
  #last-ticket-receipt :is(.receipt-pick, .receipt-placement, .receipt-xp) { display: none; }
  #last-ticket-receipt .receipt-net { overflow: hidden; text-overflow: ellipsis; }
  .app-shell .live-round-band:has(#last-ticket-receipt:not([hidden])) .round-phase {
    justify-content: center;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    line-height: 1.1;
  }
  .app-shell .live-round-band:has(#last-ticket-receipt:not([hidden])) #phase-label { font-size: 11px; }
  .app-shell:has(#last-ticket-receipt:not([hidden])) .arena-top { gap: 4px; padding-inline: 6px; }
  .app-shell:has(#last-ticket-receipt:not([hidden])) .arena-top .race-period {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
@media (max-width: 360px) {
  #last-ticket-receipt:not([hidden]) {
    display: grid;
    grid-template-columns: auto auto;
    align-content: center;
    justify-content: center;
    gap: 0 2px;
    line-height: 1.15;
  }
  #last-ticket-receipt .receipt-net { grid-column: 1 / -1; grid-row: 2; }
  #last-ticket-receipt > span:last-child { grid-column: 2; grid-row: 1; }
}
@media (max-width: 800px) and (max-height: 500px) and (orientation: landscape) {
  #last-ticket-receipt { align-self: flex-start; margin-top: -4px; }
}
