/* Official-site chrome is namespaced so the game's palette and canvas stay intact. */
.selection-screen {
  --jsc-ink: #17352f;
  --jsc-muted: #62716d;
  --jsc-green: #1f6454;
  --jsc-line: #dfe4dd;
  padding: 0;
  justify-content: flex-start;
}
.jsc-header, .jsc-footer, .jsc-dialog {
  color: var(--jsc-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.jsc-header, .jsc-footer { flex: 0 0 auto; width: 100%; }
.jsc-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.jsc-header { background: rgba(251,250,245,.94); border-bottom: 1px solid rgba(23,53,47,.08); }
.jsc-nav-shell { height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.jsc-header a, .jsc-footer a, .jsc-dialog a { color: inherit; text-decoration: none; }
.jsc-brand { display: flex; align-items: center; gap: 11px; }
.jsc-brand-mark { display: block; width: 42px; height: 42px; border-radius: 13px; box-shadow: 0 7px 20px rgba(31,100,84,.18); }
.jsc-brand-copy { display: flex; flex-direction: column; line-height: 1.1; }
.jsc-brand-copy strong { font: bold 17px Georgia, "Times New Roman", serif; letter-spacing: -.2px; }
.jsc-brand-copy small { margin-top: 4px; color: var(--jsc-muted); font-size: 11px; letter-spacing: .18em; }
.jsc-desktop-nav { display: flex; align-items: center; gap: 7px; }
.jsc-desktop-nav a { padding: 9px 13px; border-radius: 999px; color: #53635f; font-size: 14px; font-weight: 650; }
.jsc-desktop-nav a:hover, .jsc-header a.jsc-active { color: var(--jsc-green); background: #e9f1ec; }
.jsc-desktop-nav a.jsc-active::before { display: inline-block; width: 5px; height: 5px; margin-right: 6px; border-radius: 50%; background: #f39a78; content: ""; vertical-align: middle; }
.jsc-menu-button { display: none; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 12px; color: var(--jsc-ink); background: #edf2ed; cursor: pointer; }
.jsc-menu-button svg { width: 24px; height: 24px; }
.jsc-mobile-nav { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; padding-bottom: 12px; }
.jsc-mobile-nav[hidden] { display: none; }
.jsc-mobile-nav a { display: grid; place-items: center; min-height: 44px; border-radius: 11px; background: #edf2ed; font-size: 12px; font-weight: 750; }
.jsc-header a:focus-visible, .jsc-footer a:focus-visible, .jsc-footer button:focus-visible, .jsc-dialog a:focus-visible { outline: 2px solid var(--jsc-green); outline-offset: 3px; }

.selection-content { display: flex; flex: 1 0 auto; flex-direction: column; align-items: center; justify-content: center; width: 100%; padding: 12px 20px; }
.selection-content > .brand { margin-bottom: 10px; gap: 12px; }
.selection-content .brand-fruit { flex-basis: 64px; width: 64px; height: 64px; font-size: 45px; }
.selection-content h1 { font-size: 38px; }
.selection-content .eyebrow { font-size: 11px; margin-bottom: 3px; }
.selection-content .tagline { margin-top: 4px; font-size: 13px; }
.selection-content .selection-card { padding: 18px; }
.selection-content .step-heading { margin-bottom: 10px; }
.selection-content .selectors { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.selection-content .selectors label:last-child { grid-column: auto; }
.selection-content label span { margin-bottom: 4px; }
.selection-content select { min-width: 0; height: 44px; padding: 0 24px 0 10px; font-size: 14px; }
.selection-content .lesson-section { margin-top: 12px; }
.selection-content .field-label { margin-bottom: 6px; }
.selection-content .lesson-list { gap: 6px; }
.selection-content .lesson-option, .selection-content .loading-card { min-height: 48px; padding: 8px 12px; font-size: 14px; }
.selection-content .inline-message { min-height: 0; margin: 0; }
.selection-content .inline-message:not(:empty) { margin: 8px 2px; }
.selection-content .primary-button { min-height: 48px; margin-top: 10px; }

.tool-about { width: min(680px,100%); margin-top: 10px; border: 1px solid rgba(255,255,255,.8); border-radius: 16px; background: rgba(255,255,255,.7); }
.tool-about summary { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 10px 14px; cursor: pointer; list-style: none; }
.tool-about summary::-webkit-details-marker { display: none; }
.tool-about summary::before { flex: 0 0 auto; color: var(--jsc-green); content: "▶"; font-size: 10px; }
.tool-about[open] summary::before { content: "▼"; }
.tool-about summary:focus-visible { outline: 2px solid var(--jsc-green); outline-offset: 3px; border-radius: 16px; }
.tool-about h2 { margin: 0; font-size: 14px; line-height: 1.4; }
.tool-about h2 span { font-size: 12px; font-weight: 500; color: var(--muted); }
.tool-about-content { padding: 0 18px 18px; }
.tool-about h3 { margin: 16px 0 6px; font-size: 15px; }
.tool-about p { margin: 6px 0; font-size: 14px; line-height: 1.7; color: var(--muted); }
.tool-about p[lang] { color: #53635f; }
.tool-about a { color: var(--jsc-green); text-underline-offset: 3px; }
.tool-about .tool-about-source { margin-top: 14px; font-size: 12px; }

.jsc-footer { border-top: 1px solid var(--jsc-line); background: #fff; }
.jsc-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 0; }
.jsc-footer-brand { display: flex; align-items: center; gap: 11px; }
.jsc-footer-brand > a { display: grid; place-items: center; min-width: 44px; min-height: 44px; }
.jsc-footer-brand img { display: block; border-radius: 10px; }
.jsc-footer-brand > span { font: bold 17px Georgia, "Times New Roman", serif; }
.jsc-footer-brand small { color: var(--jsc-green); font: inherit; }
.jsc-social { display: flex; align-items: center; justify-content: center; gap: 22px; }
.jsc-social > a, .jsc-social > button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0; border: 0; color: var(--jsc-muted); background: none; font: inherit; font-size: 14px; cursor: pointer; }
.jsc-social svg { width: 22px; height: 22px; flex: 0 0 auto; }
.jsc-social > a:hover, .jsc-social > button:hover, .jsc-footer-links a:hover { color: var(--jsc-green); }
.jsc-footer-meta { text-align: right; }
.jsc-footer-links { display: flex; justify-content: flex-end; gap: 17px; }
.jsc-footer-links a { display: inline-flex; align-items: center; min-height: 28px; color: var(--jsc-muted); font-size: 11px; font-weight: 700; }
.jsc-copyright { margin-top: 5px; color: #89948f; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }

.jsc-dialog { width: min(520px,calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; overflow-y: auto; padding: 30px; border: 0; border-radius: 28px; background: #fffefa; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.jsc-dialog::backdrop { background: rgba(15,35,30,.6); backdrop-filter: blur(8px); }
.selection-screen:has(.jsc-dialog[open]) { /* Dialogs use native focus trapping without changing game listeners. */ isolation: isolate; }
body:has(.jsc-dialog[open]) { overflow: hidden; }
.jsc-dialog-close { position: absolute; right: 12px; top: 12px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #eef1ed; color: var(--jsc-ink); font-size: 28px; cursor: pointer; }
.jsc-dialog .jsc-dialog-eyebrow { margin: 0; color: var(--jsc-green); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.jsc-dialog h2 { margin: 10px 32px 10px 0; font: 28px/1.15 Georgia, "Times New Roman", serif; }
.jsc-dialog p { color: var(--jsc-muted); font-size: 13px; line-height: 1.6; }
.jsc-channel-options { display: grid; gap: 11px; margin-top: 24px; }
.jsc-channel-options a { display: flex; align-items: center; min-height: 66px; padding: 14px 17px; border: 1px solid var(--jsc-line); border-radius: 17px; font-size: 14px; font-weight: 650; }
.jsc-qr-dialog { text-align: center; }
.jsc-qr-dialog h2 { margin-right: 0; }
.jsc-qr-image { display: block; width: min(240px,100%); height: auto; margin: 18px auto; border: 1px solid var(--jsc-line); border-radius: 14px; }
.jsc-dialog a.jsc-dialog-link { display: grid; place-items: center; min-height: 44px; margin-top: 14px; border-radius: 12px; color: #fff; background: var(--jsc-green); }

@media (max-width: 1050px) {
  .jsc-footer-inner { flex-wrap: wrap; justify-content: center; gap: 8px 24px; padding: 14px 0; }
  .jsc-footer-meta { text-align: center; }
  .jsc-footer-links { justify-content: center; }
}
@media (max-width: 980px) {
  .jsc-desktop-nav { display: none; }
  .jsc-menu-button { display: grid; place-items: center; }
}
@media (max-width: 560px) {
  .jsc-shell { width: calc(100% - 26px); }
  .jsc-nav-shell { height: 68px; }
  .jsc-brand-mark { width: 38px; height: 38px; }
  .jsc-brand-copy strong { font-size: 15px; }
  .selection-content { padding: 10px 16px; }
  .selection-content > .brand { gap: 10px; }
  .selection-content .eyebrow { display: none; }
  .selection-content .brand-fruit { flex-basis: 48px; width: 48px; height: 48px; font-size: 36px; }
  .selection-content h1 { font-size: 30px; }
  .selection-content .selection-card { padding: 14px; border-radius: 20px; }
  .selection-content .selectors { gap: 7px; }
  .selection-content select { padding-left: 8px; padding-right: 20px; font-size: 13px; }
  .selection-content label { font-size: 12px; }
  .selection-content .lesson-option { font-size: 13px; }
  .tool-about h2 { font-size: 13px; }
  .tool-about h2 span { font-size: 11px; }
  .tool-about summary { gap: 7px; padding: 8px 10px; }
  .jsc-footer-inner { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 0 6px; padding: 6px 0 max(6px,env(safe-area-inset-bottom)); }
  .jsc-footer-brand { gap: 5px; }
  .jsc-footer-brand > a { min-width: 44px; }
  .jsc-footer-brand img { width: 28px; height: 28px; border-radius: 8px; }
  .jsc-footer-brand > span { font-size: 12px; line-height: 1.3; }
  .jsc-footer-brand small { display: block; font-size: 11px; }
  .jsc-social { gap: 0; }
  .jsc-social > a, .jsc-social > button { width: 44px; }
  .jsc-social span { display: none; }
  .jsc-footer-meta { grid-column: 1 / -1; }
  .jsc-footer-links { gap: 16px; }
  .jsc-footer-links a { min-height: 44px; }
  .jsc-copyright { margin-top: 0; line-height: 14px; font-size: 8px; }
}
@media (max-width: 560px) and (max-height: 720px) {
  .selection-content { padding: 4px 16px; }
  .selection-content > .brand { margin-bottom: 6px; }
  .selection-content h1 { font-size: 28px; }
  .selection-content .selection-card { padding: 8px 12px; }
  .selection-content .step-heading { margin-bottom: 6px; }
  .selection-content .lesson-section { margin-top: 8px; }
  .selection-content .field-label { margin-bottom: 4px; }
  .selection-content .lesson-list { gap: 4px; }
  .selection-content .lesson-option { min-height: 44px; padding: 6px 10px; }
  .selection-content .primary-button { min-height: 44px; margin-top: 8px; }
  .tool-about { margin-top: 6px; }
}

/* Accepted shared brand sample; only chrome and brand-information modal. */
.site-header .brand img { object-fit: contain; border-radius: 7px; box-shadow: none; }
.site-header .brand-copy strong, .site-header .brand-copy small { display: block; }
.site-header .brand-copy strong { font: 700 17px/1.1 Georgia, serif; }
.site-header .brand-copy small { font-size: 11px; letter-spacing: normal; }
.site-header .nav-link { font: 500 14px/21px Inter, ui-sans-serif, system-ui, sans-serif; }
.site-footer .footer-inner { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding: 18px 0; text-align: left; }
.site-footer .copyright { margin: 0; padding: 0; color: #62716d; font-size: 13px; line-height: 1.5; letter-spacing: normal; text-transform: none; }
.site-footer .footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 18px; max-width: 100%; }
.site-footer .footer-links a, .site-footer .footer-links button { display: inline-flex; align-items: center; min-height: 44px; border: 0; border-radius: 0; padding: 0; background: transparent; color: #62716d; font: 500 14px/1.5 Inter, ui-sans-serif, system-ui, sans-serif; }
.site-footer .footer-links a:hover, .site-footer .footer-links button:hover { color: #1f6454; }
.site-footer a:focus-visible, .site-footer button:focus-visible, #brandAboutDialog a:focus-visible, #brandAboutDialog button:focus-visible { outline: 2px solid #1f6454; outline-offset: 3px; }
#brandAboutDialog { position: fixed; width: min(680px, calc(100% - 36px)); max-height: calc(100dvh - 36px); overflow: auto; padding: 32px; border: 0; border-radius: 16px; background: #fffefa; color: #17352f; font: 15px/1.7 Inter, ui-sans-serif, system-ui, sans-serif; }
#brandAboutDialog::backdrop { background: rgba(15,35,30,.6); }
#brandAboutDialog h2 { margin: 0 38px 20px 0; font: 500 28px/1.3 Georgia, serif; }
#brandAboutDialog h2 span { display: block; font: 14px/1.5 system-ui,sans-serif; }
#brandAboutDialog h3 { font: 500 21px/1.4 Georgia,serif; }
#brandAboutDialog section + section { border-top: 1px solid #dfe4dd; margin-top: 20px; padding-top: 12px; }
#brandAboutDialog .footer-social-links { justify-content: flex-start; }
#brandAboutDialog .modal-close { min-height: 44px; width: 44px; height: 44px; }
@media (max-width: 760px) { .site-footer .footer-inner { flex-direction: column; align-items: flex-start; } .site-footer .footer-links { justify-content: flex-start; } }
@media (max-width: 650px) { .site-header .brand img { width: 38px; height: 38px; } .site-header .brand-copy strong { font-size: 17px; } #brandAboutDialog { padding: 24px 18px; } }

.jsc-header { background:#fff; }
.jsc-desktop-nav a { border-radius:0; background:transparent; font:500 14px/21px Inter,ui-sans-serif,system-ui,sans-serif; }
.jsc-desktop-nav a:hover, .jsc-header a.jsc-active { background:transparent; }
.jsc-desktop-nav a.jsc-active { text-decoration:underline; text-decoration-color:#ffe15a; text-decoration-thickness:2px; text-underline-offset:8px; }
.jsc-desktop-nav a.jsc-active::before { display:none; }
#brandAboutDialog .jsc-social { justify-content:flex-start; gap:8px 22px; }
#brandAboutDialog .jsc-social > a, #brandAboutDialog .jsc-social > button { display:inline-flex; align-items:center; gap:8px; width:auto; min-height:44px; }
#brandAboutDialog .jsc-social span { display:inline; }
#brandAboutDialog h2 span { display:block; font:14px/1.5 system-ui,sans-serif; }
@media(max-width:650px) { .site-header .brand img { width:38px; height:38px; } }

/* Isolate the header from the game's generic .brand and link styles. */
.jsc-header .jsc-nav-shell { align-items:center; }
.jsc-header .jsc-brand { width:auto; margin:0; flex:0 0 auto; align-items:center; }
.jsc-header .jsc-brand-mark { flex:0 0 auto; }
.jsc-header .jsc-brand-copy { flex:0 0 auto; white-space:nowrap; }
.jsc-header .jsc-desktop-nav { flex:0 0 auto; }
.jsc-header .jsc-desktop-nav a { display:flex; align-items:center; justify-content:center; gap:5px; white-space:nowrap; }
.jsc-header .jsc-mobile-nav a { display:flex; align-items:center; justify-content:center; gap:5px; white-space:nowrap; }
.jsc-header .jsc-external-icon { display:block; width:14px; height:14px; flex:0 0 14px; }
.jsc-header, .jsc-footer, .jsc-dialog, .jsc-header .jsc-brand-copy small { font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif; }
