/* COUNT-UP: result; managed only in countup/. */
.resultActions {
  display: grid;
  gap: 8px;
}

.resultNav {
  grid-template-columns: 1fr 1fr;
}

.resultNav #resume {
  grid-column: 1 / -1;
}

.pastSummary {
  text-align: center;
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
  margin-bottom: 8px;
}

.pastGames {
  max-height: 280px;
  overflow: auto;
}

.historyItem {
  display: grid;
  grid-template-columns: 54px 1fr 70px;
  gap: 8px;
  align-items: center;
  border-radius: 0px;
  padding: 8px;
  margin-bottom: 6px;
  font-weight: 900;
  background: var(--soft);
  border: 1px solid var(--line);
}

.hNo {
  color: var(--ink);
  font-size: 12px;
}

.hScore {
  font-size: 16px;
}

.hMeta {
  font-size: 11px;
  color: var(--ink);
  line-height: 1.4;
}

.hAward {
  text-align: center;
  color: var(--ink);
  font-size: 12px;
}

.resultTitle {
  font-size: 34px;
  font-weight: 900;
  text-align: center;
  color: var(--ink);
  margin: 4px 0px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.resultCard {
  border-radius: 0px;
  padding: 10px;
  text-align: center;
  background: var(--soft);
  border: 1px solid var(--line);
}

.resultCard span {
  display: block;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.resultCard strong {
  display: block;
  font-size: 26px;
  color: var(--ink);
  margin-top: 4px;
}

.awardTable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0px 6px;
  font-size: 13px;
}

.awardTable th {
  color: var(--ink);
  font-size: 11px;
}

.awardTable td {
  padding: 8px;
  text-align: center;
  font-weight: 900;
  background: var(--page);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0px;
}

.awardTable td:first-child {
  border-radius: 10px 0px 0px 10px;
  text-align: left;
  border-left: 1px solid var(--line);
}

.awardTable td:last-child {
  border-radius: 0px 10px 10px 0px;
  border-right: 1px solid var(--line);
}

.iwashi-result-ancestor {
  transform: none;
  perspective: none;
  filter: none;
  contain: none;
  container-type: normal;
}

#result[data-iwashi-result-host] {
  box-sizing: border-box;
  overflow: auto;
  position: fixed;
  right: auto;
  bottom: auto;
  top: var(--iwashi-header-height, 0px);
  left: 0px;
  width: 100dvw;
  height: calc(100dvh - var(--iwashi-header-height, 0px));
  min-width: 0px;
  min-height: 0px;
  max-width: none;
  max-height: none;
  margin: 0px;
  padding: 8px;
  transform: none;
}

#result[data-iwashi-result-host="rotated"] {
  left: 50%;
  top: calc((100dvh + var(--iwashi-header-height, 0px)) / 2);
  width: calc(100dvh - var(--iwashi-header-height, 0px));
  height: 100dvw;
  transform: translate(-50%, -50%) rotate(90deg);
}

#result {
  background: rgb(16, 18, 20);
  z-index: 2000;
}

[data-result-content] {
  min-width: 0px;
}

[data-result-actions] [role="status"] {
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 540px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

@media (pointer: coarse), (max-width: 920px) {
  #result {
    background: var(--page);
    z-index: 20;
  }

  [data-result-shell] {
    display: grid;
    grid-template-columns: minmax(0px, 1fr) clamp(140px, 24%, 210px);
    grid-template-rows: minmax(0px, 1fr);
    gap: 16px;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    min-height: 0px;
    padding: 12px;
    overflow: hidden;
    box-sizing: border-box;
  }

  [data-result-content] {
    min-height: 0px;
    overflow: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
  }

  [data-result-actions] {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    align-self: stretch;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0px;
    min-height: 0px;
    margin: 0px;
    padding: 0px;
    overflow: auto;
    overscroll-behavior: contain;
  }

  [data-result-actions] button {
    flex: 0 0 auto;
    width: 100%;
    min-height: 44px;
    margin: 0px;
    padding: 8px;
    font-size: 12px;
    line-height: 1.4;
    white-space: normal;
  }

  body:has(#result:not(.hidden)[data-result-shell]) {
    overflow: hidden;
  }

  #result [data-result-actions].panel {
    background: transparent;
    border: 0px;
    box-shadow: none;
  }

  [data-result-content] .resultTitle {
    margin: 4px 0px 10px;
    font-size: 24px;
  }
}
