/* Game-page UI only, using the existing navy, paper and mint. */
.sfd-game { box-sizing:border-box; max-width:590px; margin:0 auto; padding:32px 20px 48px; color:#002633; font:16px/1.6 Arial,sans-serif; }
.sfd-game * { box-sizing:border-box; }
.sfd-game [hidden] { display:none !important; }
.sfd-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
body.sandford-experience .sfd-heading h1 { margin:0; font:400 clamp(36px,7vw,52px)/1.1 Georgia,serif; letter-spacing:-.035em; color:#002633; }
.sfd-heading p { margin:10px 0; color:#3e5e65; }
.sfd-help-button { flex:none; width:44px; height:44px; border:1px solid #517d81; border-radius:50%; background:#f3f0e7; color:#002633; font-size:22px; cursor:pointer; }
.sfd-game .sfd-button { display:inline-block; min-height:44px; padding:11px 20px; border:1px solid #002633; border-radius:8px; background:#002633; color:#f3f0e7; font:600 16px/1.4 Arial,sans-serif; cursor:pointer; }
.sfd-meta { display:flex; flex-direction:column; gap:3px; margin:20px 0; color:#3e5e65; font-size:14px; }
.sfd-board { width:min(100%,330px); margin:24px auto 18px; display:grid; gap:7px; }
.sfd-row { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:7px; }
.sfd-tile { position:relative; aspect-ratio:1; border:2px solid #8ba5a3; border-radius:8px; background:#f8f6ef; display:flex; align-items:center; justify-content:center; font:bold 29px/1 Arial,sans-serif; transform-style:preserve-3d; }
.sfd-tile b { font-weight:700; }
.sfd-tile small { position:absolute; right:4px; bottom:3px; font:700 12px/1 Arial,sans-serif; }
.sfd-filled { border-color:#346a76; }
.sfd-tile[data-pattern=correct],.sfd-keyboard [data-pattern=correct] { background:#286a58; color:#fff; border-color:#286a58; }
.sfd-tile[data-pattern=present],.sfd-keyboard [data-pattern=present] { background:#e9c16a; color:#002633; border-color:#8b6421; }
.sfd-tile[data-pattern=absent],.sfd-keyboard [data-pattern=absent] { background:#4c5b65; color:#fff; border-color:#4c5b65; }
.sfd-game[data-colourblind=true] [data-pattern=correct] { background:#075d9c; border-color:#075d9c; color:#fff; }
.sfd-game[data-colourblind=true] [data-pattern=present] { background:#f0b177; border-color:#a65a20; color:#002633; }
.sfd-flip { animation:sfdFlip .48s ease both; animation-delay:calc(var(--tile-order)*.095s); }
.sfd-message { min-height:51px; margin:12px 0; text-align:center; font-size:15px; line-height:1.5; color:#214c59; }
.sfd-keyboard { display:grid; gap:6px; margin:0 -6px; }
.sfd-key-row { display:flex; justify-content:center; gap:4px; }
.sfd-key-row:nth-child(2) { padding:0 15px; }
.sfd-keyboard button { min-width:0; flex:1; min-height:48px; padding:8px 0; border:1px solid #8ba5a3; border-radius:7px; background:#d7e7df; color:#002633; font:700 15px/1 Arial,sans-serif; touch-action:manipulation; cursor:pointer; }
.sfd-keyboard button.sfd-key-wide { flex:1.5; font-size:12px; }
.sfd-game :is(button,a,input,textarea):focus-visible { outline:3px solid #246a83; outline-offset:3px; }
.sfd-colour { display:flex; align-items:center; justify-content:center; gap:10px; min-height:48px; margin:14px 0; font-size:14px; }
.sfd-colour input { width:20px; height:20px; accent-color:#236070; }
.sfd-stats { display:flex; gap:30px; justify-content:center; padding:15px; background:#e2e9e0; border-radius:12px; }
.sfd-stats p { margin:0; font-size:14px; }
.sfd-stats strong { display:block; font-size:25px; }
.sfd-stats-note,.sfd-reset { color:#3e5e65; text-align:center; font-size:13px; }
.sfd-houses { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:18px 0; }
.sfd-houses p { margin:0; border-top:4px solid var(--house); padding:10px 2px; text-align:center; font-size:13px; overflow-wrap:anywhere; }
.sfd-houses strong { display:block; font-size:21px; }
.sfd-result { text-align:center; background:#e2e9e0; border-radius:12px; padding:22px; margin:15px 0; }
body.sandford-experience .sfd-result h2 { font:400 29px/1.2 Georgia,serif; margin:10px 0; }
.sfd-result p { color:#294e57; margin:10px 0 20px; }
.sfd-celebration { position:relative; width:100px; height:64px; margin:0 auto; color:#23635f; }
.sfd-celebration svg { width:70px; height:58px; }
.sfd-celebration i { position:absolute; left:20%; top:60%; width:10px; height:10px; border:2px solid #23635f; border-radius:50%; opacity:0; --bubble-x:-24px; }
.sfd-celebration i:nth-of-type(2) { left:35%; width:6px; height:6px; --bubble-x:-8px; }
.sfd-celebration i:nth-of-type(3) { left:55%; --bubble-x:15px; }
.sfd-celebration i:nth-of-type(4) { left:70%; width:8px; height:8px; --bubble-x:30px; }
.sfd-celebration i:nth-of-type(5) { left:45%; --bubble-x:0px; }
.sfd-won .sfd-celebration svg { animation:sfdFin .7s ease both; }
.sfd-won .sfd-celebration i { animation:sfdBubble .9s ease-out both; }
.sfd-won .sfd-celebration i:nth-of-type(even) { animation-delay:.15s; }
.sfd-loading { padding:30px 0; text-align:center; }
.sfd-loading > svg { width:85px; height:70px; color:#23635f; }
.sfd-skeleton { display:flex; justify-content:center; gap:8px; margin:20px; }
.sfd-skeleton i { width:55px; height:55px; border-radius:8px; background:#c6ddd6; animation:sfdPulse 1.4s ease-in-out infinite; }
.sfd-skeleton i:nth-child(2) { animation-delay:.2s; }
.sfd-skeleton i:nth-child(3) { animation-delay:.4s; }
.sfd-help { max-width:490px; width:calc(100% - 32px); max-height:85svh; overflow:auto; padding:28px; border:1px solid #86aaa3; border-radius:14px; background:#f3f0e7; color:#002633; font:16px/1.6 Arial,sans-serif; }
.sfd-help::backdrop { background:#00263399; }
.sfd-help h2 { font:400 32px/1.2 Georgia,serif; margin:0 0 15px; }
.sfd-help li { margin:12px 0; }
.sfd-share-fallback { display:block; width:100%; font-size:16px; margin-top:15px; min-height:180px; }
@keyframes sfdFlip { 0% { transform:rotateX(0); } 45% { transform:rotateX(90deg); } 100% { transform:rotateX(0); } }
@keyframes sfdPulse { 50% { opacity:.45; } }
@keyframes sfdFin { 40% { transform:translateY(-8px) rotate(-6deg); } }
@keyframes sfdBubble { 20% { opacity:1; } to { transform:translate(var(--bubble-x),-55px) scale(.5); opacity:0; } }
@media(max-width:480px) {
  .sfd-game { padding:24px 12px 40px; }
  .sfd-board { width:292px; max-width:100%; }
  .sfd-keyboard button { min-height:49px; font-size:14px; }
  .sfd-houses { gap:4px; }
}
@media(prefers-reduced-motion:reduce) {
  .sfd-game * { animation:none !important; transition:none !important; }
  .sfd-skeleton i { opacity:1; }
}
