/* Letterhof: alles binnen .letterhof, zodat het thema van de site er niet aan raakt. */
.letterhof{
  --lh-bg:#EAF0F3; --lh-panel:#FFFFFF; --lh-ink:#13233A; --lh-muted:#4D5E72; --lh-line:#C9D5DE;
  --lh-board:#1D4B5A; --lh-cell:#2B6273; --lh-cellink:#CFE4EA;
  --lh-tile:#FFD45C; --lh-tileink:#1B1A12; --lh-pending:#FFB547;
  --lh-l2:#8FD3B8; --lh-l3:#3FA47E; --lh-w2:#F49A7A; --lh-w3:#D9573A;
  --lh-accent:#0E6E8C; --lh-ok:#1E7A4D; --lh-warn:#A04A12;
  font-family:Verdana,"Atkinson Hyperlegible",Tahoma,sans-serif; font-size:18px; line-height:1.45;
  color:var(--lh-ink); background:var(--lh-bg); border-radius:20px; padding:16px;
  max-width:1100px; margin:0 auto; box-sizing:border-box;
}
.letterhof.lh-groot{font-size:22px}
.letterhof *,.letterhof *::before,.letterhof *::after{box-sizing:border-box}
.letterhof [hidden]{display:none!important}
.letterhof h2,.letterhof h3,.letterhof p{margin:0}
.letterhof h2{font-size:1.4em}
.letterhof h3{font-size:.8em;text-transform:uppercase;letter-spacing:.08em;color:var(--lh-muted)}
.letterhof button,.letterhof input,.letterhof select{font:inherit;color:inherit}
.letterhof .lh-stapel{display:grid;gap:16px;grid-template-columns:minmax(0,1fr)}
.letterhof .lh-bordrand{min-width:0}
.letterhof .lh-vak{overflow:hidden}
.letterhof .lh-kop{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}
.letterhof .lh-rij{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.letterhof .lh-doos{background:var(--lh-panel);border:1px solid var(--lh-line);border-radius:18px;padding:16px;display:grid;gap:12px;min-width:0}
.letterhof .lh-stil{color:var(--lh-muted);font-size:.85em}

.letterhof .lh-knop{min-height:56px;padding:0 20px;border-radius:14px;border:2px solid var(--lh-line);background:var(--lh-panel);font-weight:700;cursor:pointer;text-align:center}
.letterhof a.lh-knop{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;color:var(--lh-ink)}
.letterhof .lh-knop.lh-wa{background:#1F7A4A;border-color:#1F7A4A;color:#fff}
.letterhof .lh-code{font-family:Consolas,"Courier New",monospace;font-weight:700;letter-spacing:.12em;text-transform:uppercase}
.letterhof input.lh-code{font-size:1.4em;max-width:260px}
.letterhof .lh-codegroot{font-size:2.2em;text-align:center;background:var(--lh-bg);border:2px dashed var(--lh-line);border-radius:14px;padding:14px 10px}
.letterhof .lh-linkrij{display:flex;gap:8px;align-items:center}
.letterhof .lh-linkrij input{flex:1 1 auto;min-width:0;max-width:none}
.letterhof .lh-linkrij input.lh-link{font-family:Consolas,monospace;font-size:.8em}
.letterhof .lh-linkrij .lh-knop{flex:none;white-space:nowrap}
.letterhof .lh-knop.lh-hoofd{background:var(--lh-accent);color:#fff;border-color:var(--lh-accent)}
.letterhof .lh-knop.lh-gevaar{border-color:var(--lh-warn);color:var(--lh-warn)}
.letterhof .lh-knop:disabled{opacity:.45;cursor:not-allowed}
.letterhof .lh-knop:focus-visible,.letterhof .lh-vak:focus-visible,.letterhof .lh-tegel:focus-visible,.letterhof .lh-spel:focus-visible,.letterhof input:focus-visible,.letterhof select:focus-visible{outline:4px solid var(--lh-accent);outline-offset:2px}
.letterhof input[type=text],.letterhof input[type=email],.letterhof select{min-height:56px;padding:0 14px;border-radius:12px;border:2px solid var(--lh-line);background:#fff;width:100%;max-width:420px}
.letterhof label{display:grid;gap:6px;font-weight:700}
.letterhof .lh-vink{display:flex;gap:12px;align-items:center;font-weight:400}
.letterhof .lh-vink input{width:28px;height:28px}

.letterhof .lh-status{border-radius:14px;padding:12px 16px;font-weight:700;background:var(--lh-panel);border:2px solid var(--lh-ok);color:var(--lh-ok)}
.letterhof .lh-status.lh-wacht{border-color:var(--lh-line);color:var(--lh-muted);font-weight:400}
.letterhof .lh-status.lh-fout{border-color:var(--lh-warn);color:var(--lh-warn)}

.letterhof .lh-spellen{display:grid;gap:10px;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}
.letterhof .lh-spel{display:grid;grid-template-columns:auto 1fr;gap:4px 12px;align-items:center;text-align:left;padding:12px;border-radius:14px;border:2px solid var(--lh-line);background:var(--lh-panel);min-height:76px;cursor:pointer}
.letterhof .lh-spel.lh-mijn{border-color:var(--lh-ok)}
.letterhof .lh-av{grid-row:span 2;width:46px;height:46px;border-radius:50%;display:grid;place-items:center;font-weight:700;background:var(--lh-l2);color:#10301F}
.letterhof .lh-pil{justify-self:start;font-size:.75em;font-weight:700;padding:2px 10px;border-radius:999px;border:1px solid var(--lh-line);color:var(--lh-muted)}
.letterhof .lh-spel.lh-plus{grid-template-columns:auto 1fr;border:2px dashed var(--lh-accent);color:var(--lh-accent)}
.letterhof .lh-plus .lh-av{background:var(--lh-accent);color:#fff;font-size:1.6em;line-height:1}
.letterhof .lh-plus b{grid-row:span 2;font-size:1.1em}
.letterhof a.lh-plus{text-decoration:none}
.letterhof a.lh-plus b{grid-row:auto}
.letterhof .lh-knop.lh-groot-knop{width:100%;min-height:72px;font-size:1.15em}
.letterhof .lh-mijn .lh-pil{background:var(--lh-ok);border-color:var(--lh-ok);color:#fff}

.letterhof .lh-vrienden{display:grid;gap:8px}
.letterhof .lh-vriend{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:10px 0;border-top:1px solid var(--lh-line)}
.letterhof .lh-vriend span{flex:1 1 180px;min-width:0;overflow-wrap:anywhere}

.letterhof .lh-score{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px;background:var(--lh-panel);border:1px solid var(--lh-line);border-radius:18px;padding:12px 16px}
.letterhof .lh-pl{display:grid}
.letterhof .lh-pl:last-child{text-align:right}
.letterhof .lh-pl b{font-size:1.8em;line-height:1;font-variant-numeric:tabular-nums}
.letterhof .lh-pl.lh-beurt span::after{content:" • aan de beurt";color:var(--lh-ok);font-size:.8em}

.letterhof .lh-bordrand{background:var(--lh-board);border-radius:20px;padding:clamp(6px,1.5vw,14px);max-width:640px;width:100%;margin:0 auto}
.letterhof .lh-bord{display:grid;grid-template-columns:repeat(11,minmax(0,1fr));gap:clamp(2px,.5vw,4px)}
.letterhof .lh-vak{border:0;border-radius:clamp(4px,1vw,8px);background:var(--lh-cell);color:var(--lh-cellink);display:grid;place-items:center;padding:0;font-size:clamp(9px,1.6vw,13px);font-weight:700;line-height:1;position:relative;aspect-ratio:1;min-width:0;cursor:pointer}
.letterhof .lh-vak.L2{background:var(--lh-l2);color:#0F3324}.letterhof .lh-vak.L3{background:var(--lh-l3);color:#fff}
.letterhof .lh-vak.W2{background:var(--lh-w2);color:#3A1407}.letterhof .lh-vak.W3{background:var(--lh-w3);color:#fff}
.letterhof .lh-vak.lh-ster{font-size:clamp(14px,2.6vw,22px)}
.letterhof .lh-vak.lh-vol,.letterhof .lh-vak.lh-nieuw{background:var(--lh-tile);color:var(--lh-tileink);font-size:clamp(15px,3.2vw,28px);box-shadow:inset 0 -3px 0 rgba(0,0,0,.18);cursor:default}
.letterhof .lh-vak.lh-nieuw{background:var(--lh-pending);outline:3px solid #fff;outline-offset:-3px;cursor:pointer}
.letterhof .lh-vak.lh-vorig{box-shadow:inset 0 0 0 3px var(--lh-accent),inset 0 -3px 0 rgba(0,0,0,.18)}
.letterhof .lh-vak.lh-wijs{box-shadow:inset 0 0 0 3px #fff}
.letterhof .lh-vak sub,.letterhof .lh-tegel sub{position:absolute;right:12%;bottom:6%;font-size:.42em;font-weight:700}

.letterhof .lh-rek{display:flex;justify-content:center;gap:clamp(6px,1.5vw,12px);flex-wrap:wrap;background:var(--lh-panel);border:1px solid var(--lh-line);border-radius:18px;padding:14px}
.letterhof .lh-tegel{position:relative;width:clamp(48px,11vw,72px);aspect-ratio:1;border:0;border-radius:12px;background:var(--lh-tile);color:var(--lh-tileink);font-size:clamp(24px,5.5vw,38px);font-weight:700;box-shadow:0 4px 0 #C99A1E;cursor:pointer;transition:transform .15s}
.letterhof .lh-tegel.lh-kies{transform:translateY(-8px);box-shadow:0 0 0 4px var(--lh-accent),0 8px 0 #C99A1E}
.letterhof .lh-tegel.lh-ruil{background:#fff;box-shadow:0 0 0 4px var(--lh-warn)}
.letterhof .lh-tegel.lh-leeg{background:transparent;box-shadow:inset 0 0 0 2px var(--lh-line);cursor:default}
/* Blanco: lichtere steen, 0 punten. */
.letterhof .lh-vak.lh-vol.lh-blanco,.letterhof .lh-vak.lh-nieuw.lh-blanco{background:#FFF1C9;color:#6B5A24}
.letterhof .lh-tegel.lh-blanco{background:#FFF1C9;color:#6B5A24}
.letterhof .lh-tegel .lh-bl{font-size:.38em;letter-spacing:.02em}
.letterhof .lh-kiesblanco{gap:8px}
.letterhof .lh-abc{display:flex;flex-wrap:wrap;gap:6px}
.letterhof .lh-abc .lh-tegel{width:clamp(36px,9vw,48px);font-size:clamp(18px,4.5vw,24px);box-shadow:0 3px 0 #C99A1E}
/* Bord van 15 x 15: breder op een groot scherm, kleinere tekst in de vakjes. */
.letterhof .lh-bordrand:has(.lh-n15){max-width:760px}
.letterhof .lh-n15 .lh-vak{font-size:clamp(7px,1.15vw,11px)}
.letterhof .lh-n15 .lh-vak.lh-vol,.letterhof .lh-n15 .lh-vak.lh-nieuw{font-size:clamp(12px,2.5vw,22px)}
.letterhof .lh-n15 .lh-vak.lh-ster{font-size:clamp(11px,2vw,18px)}
.letterhof .lh-acties{display:grid;grid-template-columns:2fr 1fr 1fr;gap:10px}
.letterhof .lh-acties2{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
@media (max-width:520px){.letterhof .lh-acties{grid-template-columns:1fr 1fr}.letterhof .lh-acties .lh-hoofd{grid-column:span 2}}
.letterhof .lh-legende{display:flex;flex-wrap:wrap;gap:12px;font-size:.8em;color:var(--lh-muted)}
.letterhof .lh-legende i{display:inline-block;width:14px;height:14px;border-radius:4px;vertical-align:-2px;margin-right:6px}
@media (prefers-reduced-motion:reduce){.letterhof .lh-tegel{transition:none}}

/* Gsm: het spel over de volle breedte (zonder de rand van het thema), het bord zo
 * groot mogelijk, de 7 letters op één rij en alles compacter erboven en eronder. */
@media (max-width:640px){
  .letterhof{width:100vw;max-width:none;margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);border-radius:0;padding:8px;font-size:17px}
  .letterhof.lh-groot{font-size:20px}
  .letterhof .lh-stapel{gap:10px}
  .letterhof .lh-kop{gap:8px}
  .letterhof .lh-kop .lh-rij{gap:6px}
  .letterhof .lh-kop{flex-wrap:wrap}
  .letterhof .lh-kop h2{font-size:1.1em}
  .letterhof .lh-kop .lh-rij{flex-wrap:wrap;justify-content:flex-end}
  .letterhof .lh-kop .lh-schakel{min-height:44px;padding:0 12px;font-size:.85em}
  .letterhof .lh-kop .lh-knop{min-height:44px;padding:0 12px;font-size:.85em;white-space:nowrap}
  .letterhof .lh-breed{display:none}
  .letterhof .lh-doos{padding:12px;border-radius:14px}
  .letterhof .lh-status{padding:8px 12px;font-size:.9em}
  .letterhof .lh-score{padding:6px 12px;border-radius:14px;gap:6px}
  .letterhof .lh-pl span{font-size:.9em}
  .letterhof .lh-pl b{font-size:1.5em}
  .letterhof .lh-bordrand{max-width:none;border-radius:10px;padding:3px}
  .letterhof .lh-bord{gap:2px}
  .letterhof .lh-vak{border-radius:4px}
  .letterhof .lh-vak.lh-vol,.letterhof .lh-vak.lh-nieuw{font-size:clamp(14px,4.6vw,26px)}
  .letterhof .lh-n15 .lh-vak{font-size:clamp(6px,1.9vw,9px);border-radius:3px}
  .letterhof .lh-n15 .lh-vak.lh-vol,.letterhof .lh-n15 .lh-vak.lh-nieuw{font-size:clamp(11px,3.6vw,20px)}
  .letterhof .lh-n15 .lh-vak sub{display:none}
  .letterhof .lh-rek{flex-wrap:nowrap;gap:5px;padding:8px;border-radius:14px}
  .letterhof .lh-tegel{flex:1 1 0;width:auto;min-width:0;max-width:64px;font-size:clamp(22px,7vw,34px);border-radius:10px}
  .letterhof .lh-acties{gap:8px}
  .letterhof .lh-acties .lh-knop,.letterhof .lh-acties2 .lh-knop{min-height:50px;padding:0 10px}
  .letterhof .lh-legende{gap:6px 12px;font-size:.75em}
}

/* Spelregels en punten: uitklapblok onder het spel (includes/spelregels.php). */
.letterhof.lh-regels{margin-top:16px;padding:0}
.letterhof.lh-regels > summary{cursor:pointer;list-style:none;padding:16px 20px;font-weight:700;font-size:1.1em;border-radius:20px}
.letterhof.lh-regels > summary::-webkit-details-marker{display:none}
.letterhof.lh-regels > summary::before{content:"\25B8";display:inline-block;margin-right:10px;transition:transform .15s}
.letterhof.lh-regels[open] > summary::before{transform:rotate(90deg)}
.letterhof .lh-rg{padding:0 20px 20px;display:grid;gap:10px}
.letterhof .lh-rg h3{margin-top:10px}
.letterhof .lh-rg ul,.letterhof .lh-rg ol{margin:0;padding-left:1.3em;display:grid;gap:6px}
.letterhof .lh-rg-waarden{border-collapse:collapse;background:var(--lh-panel);border-radius:14px;overflow:hidden}
.letterhof .lh-rg-waarden th{text-align:left;white-space:nowrap;padding:8px 14px;vertical-align:middle;font-size:.9em;color:var(--lh-muted)}
.letterhof .lh-rg-waarden td{padding:6px 10px 6px 0}
.letterhof .lh-rg-waarden tr+tr th,.letterhof .lh-rg-waarden tr+tr td{border-top:1px solid var(--lh-line)}
.letterhof .lh-rg-tegel{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;width:2.1em;height:2.3em;margin:3px;border-radius:8px;background:var(--lh-tile);color:var(--lh-tileink);font-weight:700;line-height:1}
.letterhof .lh-rg-tegel small{font-size:.55em;font-weight:400;margin-top:2px}
.letterhof .lh-rg-vakjes{list-style:none;padding-left:0!important}
.letterhof .lh-rg-vakjes i{display:inline-block;width:1em;height:1em;border-radius:4px;margin-right:8px;vertical-align:-2px}
.letterhof .lh-rg-voorbeeld{background:var(--lh-panel);border:1px solid var(--lh-line);border-radius:14px;padding:14px 16px;display:grid;gap:8px}

/* Schakelaar "Mails aan/uit" in de kop (letterhof.js, mailSchakelaar). */
.letterhof .lh-schakel{display:inline-flex;align-items:center;gap:10px;min-height:56px;padding:0 16px;border-radius:14px;border:2px solid var(--lh-line);background:var(--lh-panel);font-weight:700;cursor:pointer}
.letterhof .lh-schakel:disabled{opacity:.6;cursor:wait}
.letterhof .lh-schakel-baan{position:relative;width:52px;height:30px;border-radius:15px;background:#B9C6D0;transition:background .15s;flex:none}
.letterhof .lh-schakel-bol{position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:left .15s}
.letterhof .lh-schakel.is-aan .lh-schakel-baan{background:var(--lh-ok)}
.letterhof .lh-schakel.is-aan .lh-schakel-bol{left:25px}

/* Spelscherm. Smal: alles onder elkaar (stand, melding, bord, letters, knoppen).
 * Vanaf 900 px: het bord links, zo hoog als het scherm toelaat, en rechts ernaast
 * alles om te spelen, zodat Katelijn op haar pc niet hoeft te scrollen. */
.letterhof .lh-speelveld{display:grid;gap:16px;grid-template-columns:minmax(0,1fr)}
.letterhof .lh-rechts{display:contents}
.letterhof .lh-rechts>.lh-score{order:1}
.letterhof .lh-rechts>.lh-status{order:2}
.letterhof .lh-links{order:3;min-width:0}
.letterhof .lh-rechts>*{order:4}
@media (max-width:640px){.letterhof .lh-speelveld{gap:10px}}
@media (min-width:900px){
  .letterhof .lh-speelveld{grid-template-columns:minmax(0,1fr) minmax(300px,380px);align-items:start}
  .letterhof .lh-rechts{display:grid;gap:12px;align-content:start;order:2}
  .letterhof .lh-links{order:1}
  .letterhof .lh-links .lh-bordrand,.letterhof .lh-links .lh-bordrand:has(.lh-n15){max-width:min(760px,calc(100vh - 120px),calc(100svh - 120px));margin:0 auto}
  .letterhof .lh-rechts .lh-rek{flex-wrap:nowrap;gap:5px;padding:10px}
  .letterhof .lh-rechts .lh-tegel{flex:1 1 0;width:auto;min-width:0;max-width:52px;font-size:clamp(20px,2vw,30px)}
  .letterhof .lh-rechts .lh-acties{grid-template-columns:1fr 1fr}
  .letterhof .lh-rechts .lh-acties .lh-hoofd{grid-column:span 2}
  .letterhof .lh-rechts .lh-acties2{justify-content:stretch}
  .letterhof .lh-rechts .lh-acties2 .lh-knop{flex:1 1 40%}
}
