/* SpellingTraining: wood-framed sharing dialog */
.st-share-overlay { position:fixed; inset:0; z-index:99999; display:none; align-items:center; justify-content:center; padding:16px; box-sizing:border-box; background:rgba(0,0,0,.55); }
.st-share-overlay.st-visible { display:flex; }
.st-share-dialog { position:relative; width:min(510px,100%); max-height:calc(100vh - 32px); overflow:auto; box-sizing:border-box; border:11px ridge #8f552e; background:linear-gradient(120deg,#414141,#292929); box-shadow:0 12px 35px rgba(0,0,0,.5),inset 0 0 0 2px #27201c; color:#f4f4f4; font-family:Georgia,'Times New Roman',serif; font-size:17px; line-height:1.4; padding:13px 25px 15px; }
.st-share-dialog * {box-sizing:border-box;}
.st-share-title { margin:0 30px 12px 0; font-size:24px; color:#ffb346; line-height:1.2; font-weight:bold; }
.st-share-close {position:absolute; top:6px;right:7px; background:transparent; color:white; border:0; font:bold 26px Arial,sans-serif; cursor:pointer; padding:0 7px;}
.st-share-dialog label {display:block; color:#fff; margin:16px 0 6px; font-weight:bold;}
.st-share-input {display:block;width:100%;padding:10px 12px; background:#fff8ed; color:#252525; border:2px solid #b07b42; border-radius:3px; font:18px Arial,sans-serif;}
.st-share-input:focus {outline:2px solid #ffb347;outline-offset:2px;}
.st-share-btn {display:inline-block; padding:10px 15px; margin-top:15px; background:linear-gradient(#ffad34,#d66b05);border:1px solid #a54e04; border-radius:5px; font:bold 16px Arial,sans-serif; color:#fff; cursor:pointer;text-shadow:0 1px 1px #7d3800; }
.st-share-btn:hover {filter:brightness(1.12);}
.st-share-btn-secondary {background:linear-gradient(#688b4d,#31662e);border-color:#234923;}
.st-share-actions {display:flex; flex-wrap:wrap; gap:8px;}
.st-share-note {font-size:12px;color:#dedede;margin:10px 0 0;}
.st-share-code {padding:12px;background:#202020; border:1px solid #86522b;color:#ffe078; font:bold 20px Consolas,monospace;letter-spacing:.5px;overflow-wrap:anywhere; user-select:all;}
.st-share-error {color:#ffb3a9; font-size:15px;margin-top:8px;}
.st-share-link {font-size:14px;}
@media(max-width:480px){.st-share-dialog {padding:17px 15px;border-width:8px;font-size:16px;} .st-share-title{font-size:21px;} .st-share-code{font-size:17px;}}

/* Kid-friendly share form */
.st-share-name-heading { display:flex; align-items:center; gap:50px; margin:16px 0 6px; }
.st-share-name-heading label { margin:0; }
.st-share-info-wrap { position:relative; display:inline-flex; align-items:center; }
.st-share-info { width:21px; height:21px; border:1.5px solid #ffe19b; border-radius:50%; background:#575757; color:#ffe19b; font: bold 14px Georgia,serif; text-align:center; cursor:pointer; padding:0; line-height:18px; }
.st-share-info:focus-visible {outline:2px solid #ffb347; outline-offset:3px;}
.st-share-tooltip { display:none; position:absolute; z-index:5; left:30px; top:-10px; width:250px; max-width:calc(100vw - 100px); padding:10px 12px; background:#fff6df; color:#292929; border:2px solid #a66c35; border-radius:5px; box-shadow:0 4px 15px #1119; font:14px/1.35 Arial,sans-serif; }
.st-share-info-wrap:hover .st-share-tooltip,
.st-share-info-wrap:focus-within .st-share-tooltip,
.st-share-info[aria-expanded="true"] + .st-share-tooltip {display:block;}
.st-share-btn:disabled {opacity:.45; filter:grayscale(.5); cursor:not-allowed;}
.st-share-link {font-size:15px;}
@media(max-width:480px) {.st-share-tooltip {left:auto; right:-25px; top:29px; width:240px;}}

/* Updated results-sharing panel: anchored top, no vertical jumping */
.st-share-overlay.st-visible {
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding-top: clamp(16px, 9vh, 72px);
    padding-bottom: 16px;
}
.st-share-dialog { flex-shrink: 0; max-height: none; overflow: visible; }
#st_share_score { color: #ffffff !important; }
.st-share-instructions { color: #ffad34 !important; }

/* Two empty 728 x 90 banner reservations, above and below the student panel.
   Its top edge stays fixed, and the overlay scrolls on shorter screens. */
.st-share-overlay.st-visible {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px 16px 24px;
}
.st-share-overlay.st-visible::before,
.st-share-overlay.st-visible::after {
    content: "";
    display: block;
    box-sizing: border-box;
    flex: 0 0 90px;
    width: 728px;
    max-width: 100%;
    height: 90px;
}
.st-share-overlay.st-visible .st-share-dialog {
    flex: 0 0 auto;
    margin: 0;
    width: min(510px, 100%);
}
/* Banner spaces on the teacher results page. */
.st-results-page { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.st-results-banner {
    width: 728px;
    max-width: 100%;
    height: 90px;
    flex: 0 0 90px;
    box-sizing: border-box;
}
.st-results-page > .st-share-dialog { margin: 0; flex: 0 0 auto; }
@media (max-width: 750px) {
    .st-share-overlay.st-visible {padding-top: 12px;gap: 10px;}
    .st-results-page {gap:10px;}
}
@media print {
    .st-results-banner {display:none;}
}

/* Copy confirmation for young students; no new UI until link is copied. */
.st-share-copied-message {
    color: #a9f3a3;
    font: bold 19px/1.35 Georgia, 'Times New Roman', serif;
    text-align: center;
    margin: 13px 0 2px;
}
.st-share-copied-message[hidden] { display: none !important; }


/* Refrigerator-worthy award: only visible when printing results.html */
.st-print-certificate { display: none; }
@media print {
  @page { size: auto; margin: 9mm; }
  html, body { margin: 0 !important; padding: 0 !important; width: 100%; min-height: 0 !important; background: #fff !important; }
  body { display: block !important; font-family: Georgia, 'Times New Roman', serif; }
  .st-results-page { display: none !important; }
  .st-print-certificate {
    display: flex !important;
    box-sizing: border-box;
    position: relative;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 100%; max-width: 190mm;
    height: 244mm;
    margin: 0 auto;
    padding: 16mm 14mm 12mm;
    text-align: center;
    color: #285333;
    background: #fffefa !important;
    border: 4mm double #3c8439;
    outline: 1.4mm solid #e8a52d;
    outline-offset: -7mm;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    break-inside: avoid;
    page-break-inside: avoid;
    overflow: hidden;
  }
  .st-print-certificate::before, .st-print-certificate::after {
    
  }
  .st-print-certificate::before { left: 14mm; top: 7mm; }
  .st-print-certificate::after { right: 6mm; bottom: 4mm; transform: rotate(180deg); }
  .st-cert-site { color: #c36d11; font-size: 21pt; font-weight: bold; margin-top: 3mm; }
  .st-cert-stars { font-size: 22pt; line-height: 1; color: #e5a52c; letter-spacing: 8px; }
  .st-cert-trophy { font-size: 58pt; line-height: 1.15; margin: 0; }
  .st-cert-title { margin: 1mm 0 0; color: #b96c0b; font-size: 35pt; line-height: 1.06; font-weight: bold; }
  .st-cert-subtitle { color: #44874a; font: italic 15pt Georgia, serif; margin: 1mm 0 0; }
  .st-cert-awarded { color: #4f624b; font-size: 14pt; margin: 6mm 0 0; }
  .st-cert-name { color: #285735; font-weight: bold; font-size: 34pt; line-height: 1.1; max-width: 100%; overflow-wrap: anywhere; border-bottom: 1.5px solid #d9a94e; padding: 0 5mm 3mm; margin: 0; }
  .st-cert-accomplishment { color: #4d5945; font-size: 14pt; margin: 0; }
  .st-cert-seal { border: 3px solid #e2a92e; border-radius: 50%; width: 41mm; height: 41mm; display:flex; flex-direction:column; align-items:center; justify-content:center; box-sizing: border-box; background:#fff7dc !important; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px #dfb84b; }
  .st-cert-score { font: bold 32pt/1.1 Arial, sans-serif; color: #a8650b; }
  .st-cert-score-label { font: bold 11pt Georgia, serif; color: #647a36; }
  .st-cert-summary { color: #285735; font: bold 17pt Georgia, serif; margin: 1mm 0 0; }
  .st-cert-message { color: #b86610; font: bold 21pt Georgia, serif; margin: 0; }
  .st-cert-footer { width: 100%; display:flex; justify-content:space-between; gap:12mm; align-items:flex-end; color:#61785a; font-size:11pt; margin-top: 6mm; }
  .st-cert-date { text-align:left; }
  .st-cert-signature { text-align:center; min-width:55mm; }
  .st-cert-signature-line { border-bottom:1.5px solid #849f73; height:7mm; margin-bottom:2mm; }
  .st-cert-small { font-size:9.5pt; color:#6b7c65; }
  .st-print-certificate[hidden] {display:none!important;}
}

#st_share_overlay .st-share-dialog {
    transform: translateY(-90px);
}

