/* Guided, playable lessons (first example: The Chessboard and Square Names). Navy, ivory and gold. Raised look is CSS only: no 3D engine. */
.gd{ max-width:720px; margin:0 auto; }
.gd-progress{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin:4px 0 10px; }
.gd-count{ font-weight:800; font-size:15px; color:#0E2B3E; }
.gd-dots{ display:flex; gap:6px; list-style:none; margin:0; padding:0; }
.gd-dots li{ width:13px; height:13px; border-radius:50%; border:2px solid #0E2B3E; background:transparent; }
.gd-dots li.done{ background:#E8A43D; border-color:#8a5d0c; }
.gd-dots li.now{ transform:scale(1.3); box-shadow:0 0 0 2px #FBF7EA, 0 0 0 4px #0E2B3E; }
.gd-card{ background:#FBF7EA; color:#0E2B3E; border:2px solid #E8A43D; border-radius:14px; padding:14px 16px 12px; margin:0 0 12px; box-shadow:0 2px 0 rgba(14,43,62,.12); }
.gd-title{ font-family:var(--display); font-size:22px; line-height:1.2; margin:0 0 4px; color:#0E2B3E; outline:none; }
.gd-say{ font-size:21px; line-height:1.35; font-weight:700; margin:0 0 10px; color:#0E2B3E; }
.gd-listen{ display:flex; flex-wrap:wrap; gap:8px; margin:0 0 8px; }
.gd-listen .btn, .gd-ctl .btn{ min-height:44px; padding:8px 14px; font-size:16px; }
.gd .btn-quiet{ background:#fff; color:#0E2B3E; border:2px solid #0E2B3E; }
.gd .btn-quiet[aria-pressed="true"]{ background:#0E2B3E; color:#FBF7EA; }
.gd .btn-quiet:disabled{ opacity:.45; }
.gd-nolisten{ font-size:14px; color:#4a5d6a; }
.gd-more{ border-top:1px solid rgba(14,43,62,.2); padding-top:6px; }
.gd-more summary{ cursor:pointer; font-weight:800; min-height:34px; display:flex; align-items:center; }
.gd-more-body{ font-size:17px; padding-bottom:4px; }
.gd-stage{ width:100%; max-width:560px; margin:6px auto 10px; }
.gd-fb{ min-height:3.4em; margin:0 auto 8px; max-width:560px; display:flex; gap:10px; align-items:flex-start; font-size:18px; line-height:1.35; font-weight:600; color:#0E2B3E; }
.gd-fb:empty{ visibility:hidden; }
.gd-fb .gd-ic{ flex:0 0 28px; height:28px; border-radius:50%; display:grid; place-items:center; font-weight:900; background:#0E2B3E; color:#FBF7EA; }
.gd-fb.ok .gd-ic{ background:#236B4A; } .gd-fb.bad .gd-ic{ background:#E8A43D; color:#0E2B3E; }
.gd-fb.ok{ border-left:5px solid #236B4A; padding-left:8px; } .gd-fb.bad{ border-left:5px dashed #B07312; padding-left:8px; }
.gd-choices{ display:grid; grid-template-columns:repeat(2,1fr); gap:10px; max-width:560px; margin:0 auto 10px; }
.gd-choice{ min-height:58px; font-size:24px; font-weight:800; background:#fff; color:#0E2B3E; border:3px solid #0E2B3E; border-radius:12px; }
.gd-choice.ok{ background:#236B4A; color:#fff; border-color:#236B4A; }
.gd-choice.ok::after{ content:" \2713"; } .gd-choice.no{ text-decoration:line-through; opacity:.55; }
.gd-ctl{ display:flex; flex-wrap:wrap; gap:8px; justify-content:center; max-width:560px; margin:0 auto 12px; }
.gd-nav{ display:flex; justify-content:space-between; gap:10px; max-width:560px; margin:6px auto 4px; }
.gd-nav .btn{ min-height:50px; padding:10px 22px; font-size:18px; }
.gd-nav .btn-brass:disabled{ opacity:.45; }
.gd-pulse{ animation:gdnudge 1.1s ease-in-out 2; }
.gd-done-note{ background:#E7F3EC; border:2px solid #236B4A; border-radius:10px; padding:8px 12px; font-weight:700; color:#12402b; }
.gd-words{ margin:0; } .gd-words div{ display:grid; grid-template-columns:minmax(120px,1fr) 3fr; gap:8px; padding:6px 0; border-bottom:1px solid rgba(0,0,0,.12); } .gd-words dt{ font-weight:800; } .gd-words dd{ margin:0; }
/* highlights: each also has an outline or an icon, so color is never the only clue */
.gd .sq.g-line::after{ content:""; position:absolute; inset:0; background:rgba(42,111,192,.52); box-shadow:inset 0 0 0 3px rgba(14,43,62,.95); z-index:1; }
.gd .sq.g-ex::after{ content:""; position:absolute; inset:0; background:rgba(232,164,61,.72); box-shadow:inset 0 0 0 3px #6b4a0b; z-index:1; }
.gd .sq.g-hint::after{ content:""; position:absolute; inset:0; box-shadow:inset 0 0 0 4px #E8A43D, inset 0 0 0 7px #0E2B3E; animation:gdpulse 1.2s ease-in-out infinite; z-index:1; }
.gd .sq.good::after{ background:rgba(35,107,74,.78); }
.gd .sq .lbl{ font-size:clamp(14px,3.4vw,24px); }
.gd-corner{ fill:#E8A43D; stroke:#0E2B3E; stroke-width:3; }
/* raised look: soft frame shadow, a gentle shine on each square, pieces that stand up with a shadow under them. A flat option removes all of it. */
.gd:not(.gd-flat) .cfc-board{ border-radius:8px; box-shadow:0 0 0 7px #153A52, 0 0 0 9px #0E2B3E, 0 16px 22px -8px rgba(8,22,36,.5); overflow:visible; }
.gd:not(.gd-flat) .sq.l{ background-image:linear-gradient(145deg,rgba(255,255,255,.28),rgba(0,0,0,.05)); }
.gd:not(.gd-flat) .sq.d{ background-image:linear-gradient(145deg,rgba(255,255,255,.14),rgba(0,0,0,.12)); }
.gd:not(.gd-flat) .sq{ box-shadow:inset 0 0 0 .5px rgba(0,0,0,.1); }
.gd:not(.gd-flat) .pc svg{ width:94%; height:94%; transform:translateY(-7%); filter:drop-shadow(0 3px 1.5px rgba(0,0,0,.4)); }
.gd:not(.gd-flat) .pc::before{ content:""; position:absolute; left:20%; right:20%; bottom:11%; height:11%; border-radius:50%; background:radial-gradient(rgba(0,0,0,.38),rgba(0,0,0,0) 72%); }
.gd-flat .cfc-board{ box-shadow:0 0 0 3px #0E2B3E; }
@keyframes gdpulse{ 0%,100%{ opacity:1; } 50%{ opacity:.45; } }
@keyframes gdnudge{ 0%,100%{ transform:translateX(0); } 40%{ transform:translateX(4px); } 70%{ transform:translateX(-3px); } }
@media (prefers-reduced-motion: reduce){ .gd *{ animation:none!important; transition:none!important; } }
@media (max-width:560px){
  .gd-say{ font-size:19px; } .gd-title{ font-size:20px; } .gd-fb{ font-size:17px; }
  .gd-ctl .btn{ flex:1 1 44%; } .gd-listen .btn{ flex:1 1 28%; padding:8px 8px; }
  .gd:not(.gd-flat) .cfc-board{ box-shadow:0 0 0 5px #153A52, 0 0 0 7px #0E2B3E, 0 12px 16px -8px rgba(8,22,36,.5); }
  .gd-stage{ padding:0 7px; }
}
.gd [hidden]{ display:none!important; }
/* On a guided lesson the title area is compact so the instruction and the board fit together on a phone, and the save notice never sits on the board. */
.page:has(.gd) .crumbs, .page:has(.gd) .lesson-kicker{ display:none; }
.page:has(.gd) .lesson-head h1{ font-size:22px; margin:0; }
.page:has(.gd) .lesson-head{ margin-bottom:4px; }
body:has(.gd) .cloud-status{ display:none!important; }
.gd-saved{ min-width:9.5em; font-weight:800; font-size:14px; color:#12402b; visibility:hidden; }
.gd-saved.on{ visibility:visible; }
@media (max-width:560px){
  .gd-more summary{ min-height:30px; font-size:15px; }
  .gd-card{ padding:10px 12px 8px; margin-bottom:8px; } .gd-say{ margin-bottom:8px; }
  .gd-listen .btn{ min-height:40px; font-size:15px; }
  .gd-progress{ margin:0 0 6px; }
}
@media (max-width:560px){
  .page:has(.gd) .lesson-head h1{ font-size:18px; line-height:1.2; }
  .page:has(.gd) .lesson-status{ display:none; }
  .page:has(.gd) .lesson-head .btn-row{ display:none; }
  .page:has(.gd) .tabs{ margin-bottom:6px; }
}

@media (max-width:560px){
  .gd-dots{ display:none; }
  .gd-listen{ gap:6px; margin-bottom:4px; } .gd-listen .btn{ min-height:44px; font-size:14px; padding:6px 6px; }
  .gd-title{ font-size:18px; margin-bottom:2px; } .gd-say{ font-size:18px; margin-bottom:6px; }
  .gd-more summary{ min-height:28px; }
  .gd-done-note{ font-size:15px; padding:6px 10px; }
}
@media (max-width:560px){
  .gd-fb:empty{ display:none; }
  .gd-choices{ grid-template-columns:repeat(4,1fr); gap:8px; }
  .gd-choice{ min-height:54px; font-size:21px; padding:6px 2px; }
}

.gd-err{ background:#FFF3F1; border:2px solid #A3302F; border-radius:12px; padding:10px 14px; margin:0 0 10px; color:#5c1a14; }
.gd-err p{ margin:0 0 8px; font-size:16px; line-height:1.35; }
.gd-err-btns{ display:flex; flex-wrap:wrap; gap:8px; }
.gd-err-btns .btn{ min-height:44px; }
