/* Shared high scores, using the site's existing Banana Ventura identity. */
.score-share { position: relative; margin-top: 10px; padding: 10px 0 0; border-top: 1px solid #2a9d6f26; text-align: left; }
.score-share h3 { font-family: 'DM Sans', sans-serif; font-size: 11px; line-height: 1.4; font-weight: 600; color: var(--bv-green-deep); margin: 0 0 7px; }
.share-actions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 40px); justify-content: start; gap: 5px; }
.share-actions .share-icon { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 40px; min-width: 0; padding: 0; border-radius: 9px; border: 1px solid #bdd4b8; background: #fffdf7; color: var(--bv-green-deep); text-decoration: none; cursor: pointer; }
.share-actions svg { display: block; width: 19px; height: 19px; flex: none; pointer-events: none; }
.share-actions .share-primary { background: var(--bv-green-deep); border-color: var(--bv-green-deep); color: white; }
.share-actions .share-icon:hover { background: #e2edd7; border-color: var(--bv-green); }
.share-actions .share-primary:hover { background: #176847; }
.share-actions button:disabled { opacity: .65; cursor: default; }
.score-share a:focus-visible, .score-share button:focus-visible, .score-share textarea:focus-visible, .shared-challenge button:focus-visible { outline: 2px solid var(--bv-green-deep); outline-offset: 3px; }
.score-share .share-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.score-share .share-status { font-size: 10px; line-height: 1.5; margin: 6px 0 0; color: var(--bv-green-deep); overflow-wrap: anywhere; }
.share-status:empty { display: none; }
.score-share label { display: block; font-size: 10px; margin: 10px 0 5px; }
.score-share textarea { display: block; width: 100%; resize: vertical; font: inherit; font-size: 16px; color: var(--bv-ink); border: 1px solid #bdd4b8; border-radius: 7px; padding: 8px; background: #fffdf7; }
.shared-challenge { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 20px; padding: 16px 19px; border-radius: 15px; border: 1px solid #2a9d6f35; background: #faf7f0; }
.shared-challenge > div { min-width: 0; }
.shared-challenge p { margin: 6px 0 0; font-size: 15px; font-weight: 700; color: var(--bv-green-deep); overflow-wrap: anywhere; }
.shared-challenge button { flex-shrink: 0; min-height: 44px; border: 0; border-radius: 9px; background: var(--bv-green-deep); color: white; font: inherit; font-size: 12px; font-weight: 700; padding: 11px 15px; }
@media(max-width: 560px) { .shared-challenge { align-items: stretch; flex-direction: column; padding: 15px; } }
.result-card { width: min(850px, calc(100% - 32px)); max-height: calc(100% - 28px); padding: 25px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.result-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .94fr); gap: 28px; }
.result-summary { min-width: 0; }
.result-summary .result-stars { font-size: 24px; margin: 6px 0; }
.result-summary h2 { font-size: 26px; }
.result-summary > p { font-size: 11px; margin: 6px 0 13px; }
.result-summary .result-stats { padding: 11px 0; }
.result-summary .result-stats b { font-size: 17px; }
.score-total { display: flex; align-items: center; justify-content: space-between; text-align: left; margin-top: 13px; border-radius: 12px; padding: 12px 14px; background: #edf5e8; border: 1px solid #2a9d6f26; }
.score-total > span { font-size: 8px; font-weight: 800; letter-spacing: 1.2px; color: var(--bv-green-deep); }
.score-total small { display: block; font-size: 9px; font-weight: 400; letter-spacing: 0; color: #6c796d; margin-top: 5px; }
.score-total strong { font-family: 'Rubik', sans-serif; font-size: 29px; font-weight: 800; color: var(--bv-green-deep); letter-spacing: -1px; }
.score-form { margin-top: 13px; text-align: left; }
.score-form label { display: block; font-weight: 700; font-size: 11px; margin-bottom: 7px; }
.score-entry { display: flex; gap: 6px; }
.score-entry input { min-width: 0; width: 100%; flex: 1; border: 1px solid #bed3bc; background: #fffdf8; border-radius: 9px; color: var(--bv-ink); font: inherit; font-size: 12px; padding: 10px; }
.score-entry input:focus { outline: 2px solid var(--bv-green); outline-offset: 1px; }
.score-entry button { background: var(--bv-green-deep); color: #fff; border: 0; border-radius: 9px; padding: 9px 12px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.score-entry button:disabled { opacity: .7; cursor: default; }
.score-form > small { display: block; font-size: 8px; color: #667568; margin-top: 6px; line-height: 1.6; }
.result-summary .save-score-status { font-size: 10px; line-height: 1.55; min-height: 0; margin: 7px 0 0; }
.save-score-status:empty { display: none; }
.save-score-status.saved { color: var(--bv-green-deep); font-weight: 700; }
.save-score-status.error { color: #a24930; }
.result-summary .record-note { font-size: 8px; margin-top: 8px; }
.result-summary .play-button { margin-top: 10px; min-height: 40px; font-size: 11px; }
.result-summary .panel-actions { margin-top: 12px; }
.result-leaderboard { text-align: left; border-left: 1px solid #dbe2cf; padding-left: 26px; min-width: 0; }
.result-leaderboard h3 { font-family: 'Rubik', sans-serif; font-weight: 800; font-size: 22px; margin: 8px 0 18px; letter-spacing: -.6px; }
.result-leaderboard h3 span { color: var(--bv-gold); font-size: 19px; }
.board-caption { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.board-caption b { color: var(--bv-green-deep); font-size: 11px; }
.board-caption > span { font-size: 7px; letter-spacing: 1px; font-weight: 700; color: #78846d; }
.score-table { border-collapse: collapse; width: 100%; text-align: left; font-variant-numeric: tabular-nums; table-layout: fixed; }
.score-table th { font-size: 8px; font-weight: 600; letter-spacing: .4px; color: #7b8573; padding: 8px 6px; border-bottom: 1px solid #dce2d1; }
.score-table td { padding: 10px 6px; font-size: 11px; border-bottom: 1px solid #e6e9dc; overflow-wrap: anywhere; }
.score-table th:first-child, .score-table td:first-child { width: 30px; padding-left: 4px; }
.score-table th:nth-child(3), .score-table td:nth-child(3) { text-align: right; width: 64px; font-weight: 800; }
.score-table th:last-child, .score-table td:last-child { text-align: right; width: 57px; font-size: 9px; color: #72806e; padding-right: 2px; }
.score-rank { color: #849178; font-weight: 800; }
.podium-1 { color: #aa7d07; }
.podium-2 { color: #667e83; }
.podium-3 { color: #a7714c; }
.your-score td { background: #e7f5e6; color: var(--bv-green-deep); }
.your-score td:first-child { border-radius: 7px 0 0 7px; }
.your-score td:last-child { border-radius: 0 7px 7px 0; }
.board-status { text-align: center; color: #6c7d6a; font-size: 11px; line-height: 1.7; padding: 24px 13px; border: 1px dashed #ccd8be; border-radius: 10px; background: #f6f6e9; }
.result-leaderboard .board-status { margin: 0; font-size: 11px; padding: 25px 12px; }
.board-scroll { max-height: 305px; overflow: auto; scrollbar-width: thin; }
.board-retry { display: block; background: none; border: 0; text-decoration: underline; color: var(--bv-green-deep); font-size: 11px; padding: 10px 0; }
.score-explanation { margin-top: 14px; color: #667864; font-size: 9px; }
.score-explanation summary { cursor: pointer; font-weight: 600; }
.score-explanation p { font-size: 9px; line-height: 1.8; margin: 8px 0 0; }
.leaderboard-section { margin-top: 30px; border-top: 1px solid #1f7e5717; padding-top: 28px; }
.leaderboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.leaderboard-heading h2 { font-family: 'Rubik', sans-serif; font-size: 30px; font-weight: 800; color: var(--bv-ink); letter-spacing: -1px; margin: 9px 0 6px; }
.leaderboard-heading h2 span { color: var(--bv-gold); }
.leaderboard-heading p { color: #657668; font-size: 11px; margin: 0; }
.refresh-scores { display: flex; align-items: center; gap: 6px; border: 1px solid #2a9d6f35; background: #fffdf7; border-radius: 999px; padding: 9px 13px; color: var(--bv-green-deep); font-size: 18px; line-height: 1; }
.refresh-scores span { font-size: 10px; font-weight: 700; }
.leaderboard-tabs { display: flex; flex-wrap: wrap; gap: 3px; width: fit-content; max-width: 100%; background: #fffdf7; border: 1px solid #2a9d6f26; border-radius: 19px; padding: 4px; margin: 19px 0 12px; }
.leaderboard-tab { font-size: 11px; padding: 9px 16px; border: 0; background: none; border-radius: 999px; font-weight: 700; color: var(--bv-green-deep); }
.leaderboard-tab.active { color: #fff; background: var(--bv-green-deep); }
.board-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 13px; font-size: 10px; color: #62726c; }
.board-controls label { font-weight: 700; color: var(--bv-green-deep); }
.board-controls select { border: 1px solid #2a9d6f35; border-radius: 8px; background: #fffdf7; color: var(--bv-green-deep); font: inherit; font-weight: 700; padding: 8px 25px 8px 10px; }
.board-controls select:focus-visible { outline: 2px solid var(--bv-green); outline-offset: 2px; }
.page-board { padding: 19px 22px; border: 1px solid #2a9d6f26; background: #fffdf6; border-radius: 15px; }
.page-board .board-caption { margin-bottom: 5px; }
.page-board .score-table th, .page-board .score-table td { padding: 12px 9px; }
.page-board .score-table th:first-child, .page-board .score-table td:first-child { width: 55px; }
.page-board .score-table th:nth-child(3), .page-board .score-table td:nth-child(3) { width: 100px; }
.page-board .score-table th:last-child, .page-board .score-table td:last-child { width: 80px; }
.page-board .score-table td { font-size: 13px; }
.page-board .score-table td:last-child { font-size: 11px; }
.leaderboard-note { font-size: 9px; color: #7c8772; margin: 14px 0 0; line-height: 1.6; }
@media(max-width: 760px) {
  .result-card { padding: 18px; width: calc(100% - 24px); max-height: calc(100% - 20px); }
  .result-grid { gap: 19px; }
  .result-summary h2 { font-size: 21px; }
  .result-summary .result-stars { font-size: 21px; margin: 3px 0; }
  .result-summary > p { font-size: 10px; }
  .result-leaderboard { padding-left: 17px; }
  .result-leaderboard h3 { font-size: 19px; margin-bottom: 12px; }
  .score-entry { flex-direction: column; }
  .score-entry button { min-height: 35px; }
  .score-total strong { font-size: 25px; }
  .board-scroll { max-height: 250px; }
  .leaderboard-heading h2 { font-size: 26px; }
  .leaderboard-section { margin-top: 24px; padding-top: 24px; }
  .page-board { padding: 16px; }
}
@media(max-width: 560px) {
  .result-grid { grid-template-columns: 1fr; gap: 23px; }
  .result-leaderboard { padding: 18px 0 0; border-left: 0; border-top: 1px solid #dbe2cf; }
  .score-entry { flex-direction: row; }
  .result-summary h2 { font-size: 23px; }
  .result-summary .result-stars { font-size: 23px; }
  .result-card { padding: 19px; }
  .result-leaderboard h3 { font-size: 23px; margin-bottom: 15px; }
  .score-table td { font-size: 12px; }
  .score-total strong { font-size: 28px; }
  .score-entry input { font-size: 16px; }
  .leaderboard-tabs { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: 17px; }
  .leaderboard-tab { padding: 10px 8px; font-size: 11px; white-space: nowrap; }
  .leaderboard-heading h2 { font-size: 25px; }
  .leaderboard-heading p { font-size: 9px; }
  .refresh-scores span { display: none; }
  .refresh-scores { padding: 9px 12px; }
  .page-board .score-table th:first-child, .page-board .score-table td:first-child { width: 30px; }
  .page-board .score-table th:nth-child(3), .page-board .score-table td:nth-child(3) { width: 67px; }
  .page-board .score-table th:last-child, .page-board .score-table td:last-child { width: 54px; }
  .page-board .score-table th, .page-board .score-table td { padding: 12px 4px; }
  .page-board .score-table td { font-size: 11px; }
  .page-board .score-table td:last-child { font-size: 9px; }
  .page-board { padding: 14px; }
}
@media(max-height:530px) and (orientation:landscape) {
  .leaderboard-section { display: none; }
  .result-card { max-width: 850px; padding: 15px 20px; }
  .result-grid { grid-template-columns: minmax(0,1fr) minmax(0,.85fr); gap: 20px; }
  .result-leaderboard { padding: 0 0 0 18px; border-left: 1px solid #dbe2cf; border-top: 0; }
  .score-entry { flex-direction: row; }
}
