/* =====================================================================
   dusktype — results screen, charts, tooltips, words history
   ===================================================================== */
#resultView { width: 100%; max-width: 62.5rem; margin: 0 auto; }
.result-top { display: grid; grid-template-columns: auto 1fr; gap: 1.75rem; align-items: stretch; }
.big { display: flex; flex-direction: column; justify-content: center; gap: 0.5rem; min-width: 9.375rem; }
.big .label { font-size: 1.7rem; line-height: 1; color: var(--sub); }
.big .value { font-size: 4rem; line-height: 1.05; color: var(--text); }
.badge {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 0.375rem;
  border: 1px solid var(--main); color: var(--main);
  font-size: .72rem; border-radius: 0.375rem; padding: 2px 0.625rem;
  animation: pop 180ms ease-out;
}
.badge svg { width: 0.75rem; height: 0.75rem; }

/* charts (shared with the history view) */
.chart-wrap { position: relative; height: 13.75rem; background: var(--panel); border-radius: 0.5rem; }
.chart-wrap.tall { height: 15.625rem; background: transparent; }
.chart-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.tip {
  position: absolute; z-index: 5; pointer-events: none;
  background: var(--bg); border: 1px solid var(--sub-alt); border-radius: 0.375rem;
  padding: 0.375rem 0.625rem; font-size: .72rem; color: var(--text); white-space: nowrap;
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, .35);
}
.tip .h { color: var(--sub); margin-bottom: 2px; }
.tip .sw { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 2px; margin-right: 0.4375rem; }
.tip b { font-weight: 400; color: var(--text); margin-left: 0.375rem; }

.more { display: flex; flex-wrap: wrap; gap: 0.875rem 2.5rem; margin-top: 1.375rem; }
.stat .k { font-size: .78rem; color: var(--sub); }
.stat .v { font-size: 1.6rem; line-height: 1.2; color: var(--text); }
.stat .v.sm { font-size: 1rem; line-height: 1.9; }
#rRace { color: var(--main); }
#rRace.lost { color: var(--error); }

.rbuttons { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1.625rem; }
.rbuttons .icon-btn { width: 3.125rem; height: 2.5rem; }
.rbuttons .icon-btn:hover { background: var(--sub-alt); }
.rhint { margin-top: 0.875rem; }

.whist {
  display: flex; flex-wrap: wrap; align-items: flex-start;
  gap: 0.375rem 2px; margin-top: 1.125rem; padding: 0.875rem 0.75rem;
  background: var(--panel); border-radius: 0.5rem;
  font-size: 1.1rem;
  animation: viewIn 150ms ease-out;
}
.hword { display: inline-flex; flex-direction: column; margin: 0 .3em; }
.hword .w { white-space: nowrap; }
.hword.error .w { background: linear-gradient(var(--error), var(--error)) left bottom / 100% 2px no-repeat; }
.hword .typed { font-size: .62em; color: var(--error); line-height: 1.4; }

@media (max-width: 760px) {
  .result-top { grid-template-columns: 1fr; gap: 1rem; }
  .big { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 0.625rem 1.75rem; }
  .big .value { font-size: 3rem; }
  .more { gap: 0.75rem 1.625rem; }
}
