#game.result-open,
#game.result-open #overlay {
  touch-action: pan-y;
}

.start-logo-approved img {
  position: static;
  width: 100%;
  max-width: 100%;
  height: auto;
}

#game.result-open #overlay {
  align-items: flex-start;
  overflow: hidden;
  padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
}

.v7-result-card {
  width: min(100%, 440px);
  max-height: calc(100svh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom)));
  margin: auto;
  padding: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  color: #3b230e;
  background: linear-gradient(180deg, #fffaf0, #fff0c5);
  border: 3px solid #d99a1e;
  border-radius: 24px;
  box-shadow: 0 0 0 3px #6f3b1030, 0 14px 42px #41210055;
  text-align: center;
}

.v7-result-logo {
  width: min(48%, 190px);
  height: auto;
  margin: 0 auto 4px;
}

.v7-result-title {
  margin: 0;
  font-size: clamp(22px, 6vw, 29px);
  line-height: 1;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .025em;
}

.v7-result-score {
  margin-top: 7px;
  color: #281609;
  font-size: clamp(46px, 14vw, 66px);
  font-weight: 1000;
  line-height: .85;
}

.v7-result-score-label {
  margin: 4px 0 8px;
  color: #84500f;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: .18em;
}

.v7-score-breakdown,
.v7-entry-box,
.v7-ranking-box {
  margin: 8px 0;
  background: #fffaf0c9;
  border: 1px solid #dda63b;
  border-radius: 16px;
  overflow: hidden;
}

.v7-score-breakdown {
  padding: 3px 11px;
}

.v7-score-row {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #d8a74f66;
  font-size: 13px;
  font-weight: 800;
}

.v7-score-row:last-child { border-bottom: 0; }
.v7-score-row strong { font-size: 18px; }
.v7-score-row.is-total { color: #291608; }
.v7-score-row.is-total strong { color: #b56800; font-size: 23px; }

.v7-entry-box,
.v7-ranking-box {
  padding: 10px;
}

.v7-entry-box h2,
.v7-ranking-box h2,
.v7-modal-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 1000;
  text-transform: uppercase;
}

.v7-input-label {
  display: block;
  margin: 7px 0 4px;
  text-align: left;
  font-size: 12px;
  font-weight: 900;
}

.v7-player-input {
  width: 100%;
  min-height: 44px;
  padding: 8px 11px;
  color: #2b190b;
  background: #fff;
  border: 2px solid #d79a27;
  border-radius: 11px;
  outline: none;
  font-size: 16px;
  font-weight: 750;
}

.v7-player-input:focus {
  border-color: #7b430a;
  box-shadow: 0 0 0 3px #f4c85d80;
}

.v7-player-input:disabled { opacity: .62; }

.v7-consent {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 7px;
  align-items: start;
  margin: 8px 0 5px;
  text-align: left;
  font-size: 10px;
  line-height: 1.25;
}

.v7-consent input {
  width: 22px;
  height: 22px;
  accent-color: #8c500d;
}

.v7-form-message {
  min-height: 17px;
  margin: 4px 0;
  font-size: 11px;
  font-weight: 850;
}

.v7-form-message[data-kind="error"] { color: #ac2119; }
.v7-form-message[data-kind="success"] { color: #14762b; }

.v7-primary-button,
.v7-replay-button,
.v7-secondary-button,
.v7-small-button,
.v7-modal-close {
  min-height: 44px;
  border-radius: 999px;
  font-weight: 1000;
  cursor: pointer;
}

.v7-primary-button,
.v7-replay-button {
  width: 100%;
  padding: 10px 14px;
  color: #fff5cf;
  background: linear-gradient(#503017, #2d190b);
  box-shadow: 0 3px 0 #160c05;
}

.v7-primary-button:disabled {
  opacity: .48;
  cursor: default;
  box-shadow: none;
}

.v7-replay-button {
  margin: 2px 0 3px;
  color: #351d09;
  background: linear-gradient(#ffd659, #efa91e);
  box-shadow: 0 3px 0 #9c5c08;
  font-size: 18px;
}

.v7-ranking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.v7-secondary-button,
.v7-small-button {
  min-height: 36px;
  padding: 6px 11px;
  color: #fff5cf;
  background: #43260f;
  font-size: 11px;
}

.v7-small-button {
  display: block;
  margin: 7px auto 0;
}

.v7-list-state {
  padding: 12px 5px;
  color: #765326;
  font-size: 12px;
  font-weight: 800;
}

.v7-list-error { color: #9e241b; }

.v7-highscore-table {
  width: 100%;
  overflow: hidden;
  border: 1px solid #dfad4b;
  border-radius: 11px;
  background: #fffdf6;
}

.v7-highscore-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 58px 76px;
  align-items: center;
  min-height: 31px;
  border-bottom: 1px solid #e8c98480;
  font-size: 10px;
}

.v7-highscore-row:last-child { border-bottom: 0; }
.v7-highscore-row > span { padding: 4px 3px; }
.v7-highscore-row > span:first-child,
.v7-highscore-row > span:nth-child(3) { font-weight: 1000; }
.v7-highscore-head { color: #fff5ce; background: #4a2a11; font-weight: 1000; }
.v7-highscore-row.is-own { color: #412406; background: #ffe28b; box-shadow: inset 4px 0 #e89b00; }
.v7-player-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; font-weight: 850; }

.v7-modal {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(10px, env(safe-area-inset-top)) 8px max(10px, env(safe-area-inset-bottom));
  background: #1c1109d9;
  overflow: hidden;
}

.v7-modal-panel {
  width: min(100%, 470px);
  max-height: 92svh;
  display: flex;
  flex-direction: column;
  padding: 10px;
  color: #3a210d;
  background: linear-gradient(#fffaf0, #ffeab3);
  border: 3px solid #e0a52f;
  border-radius: 20px;
  box-shadow: 0 16px 50px #0008;
  overflow: hidden;
}

.v7-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.v7-modal-close {
  width: 46px;
  min-height: 46px;
  color: #fff5cf;
  background: #42250e;
  font-size: 28px;
  line-height: 1;
}

.v7-modal-list {
  min-height: 120px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

@media (max-width: 359px) {
  .v7-result-card { padding: 9px; }
  .v7-highscore-row { grid-template-columns: 34px minmax(0, 1fr) 52px 68px; font-size: 9px; }
  .v7-consent { font-size: 9px; }
}

@media (min-width: 600px) {
  .v7-result-card { padding: 15px 17px; }
  .v7-highscore-row { font-size: 11px; }
}
