/* R50 Paket „abend“ – Startseite „Nach Feierabend“: die Abendszene auf dem Tisch (patch_x50_abend.py, r41-x50-abend.js).
   Auf einem langen Schreibtisch (Beine unten ausgeblendet): links Furkan, der am Tisch schläft (Stop-Motion, nur mit den Bildern von
   tools/r50-bilder.py), daneben dieselbe Lampe wie bei 17:00 (Zustand gemeinsam), unter ihrem Licht das rote Knäuel an seinem Faden.
   Das Knäuel ist der einzige Weg nach /projekt (echter Link). Daneben der Text. Farben hier für HELL; Dunkel-Werte unten (dk:fest). */
html body #familie{overflow-x:clip}
#familie .x50-eve{--lh:210px;--lw:calc(var(--lh) * .731);--F:250px;--leg:70px;--dh:24px;--ds:10px;--bs:76px;--dimg-h:240px;
  --stand:calc(var(--leg) + var(--dh) - var(--ds) * .5);
  --lamp-l:calc(var(--F) * .78 + 18px);--ball-cx:calc(var(--lamp-l) + var(--lw) * .8 + 50px);
  --art-w:calc(var(--ball-cx) + var(--bs) / 2 + 40px);--art-h:calc(var(--leg) + var(--dh) + 232px);
  position:relative;display:flex;flex-direction:column;justify-content:flex-end;min-height:var(--art-h);
  margin:64px 0 0;padding:0 0 calc(var(--leg) + var(--dh) + var(--bs) + 14px) var(--art-w)}   /* the text stays above the tangle (it rolls along the desk) */
#familie .x50-eve:not(.has-fig){--F:0px;--lamp-l:24px}
#familie .x50-art{position:absolute;inset:0;pointer-events:none}
#familie .x50-eve .x49-eve-text{max-width:620px}

/* --- the words (as before; the link is gone, the tangle is the way on) ------------------------------------------------ */
#familie .x49-eve-pre{margin:0 0 2px;font-size:22px;line-height:1.2;color:#5b4a73}
#familie .x49-eve-h{margin:0 0 12px;font:800 clamp(20px,1.7vw,24px)/1.25 Manrope,system-ui,sans-serif;letter-spacing:-.01em;color:#152d38}
#familie .x49-key{list-style:none;margin:0 0 10px;padding:0;display:grid;gap:6px}
#familie .x49-key li{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:start;margin:0;padding:0;font:500 15.5px/1.5 Manrope,system-ui,sans-serif;color:#2f4650}
#familie .x49-key li::before{content:none}
#familie .x49-key b{font-weight:700;color:#152d38}
#familie .x49-sw{width:30px;height:10px;overflow:visible;margin-top:calc(.75em - 5px)}
#familie .x49-sw .ab-l-twist{stroke-width:.9}
#familie .x49-eve-p{margin:0;font:500 15.5px/1.55 Manrope,system-ui,sans-serif;color:#2f4650}
#familie .x49-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}

/* --- the desk: top plane and front board in the drawn style of the lamp's own desk; legs fade out downwards ----------------- */
#familie .x50-desk{position:absolute;left:var(--x50-dl,-14px);right:var(--x50-dr,calc(50% - 50vw));bottom:var(--leg);height:var(--dh);box-sizing:border-box;
  border:1.6px solid #0a2837;border-right:0;border-radius:7px 0 0 3px;
  background:linear-gradient(#f9ecdf,#f9ecdf) 0 0/100% var(--ds) no-repeat,linear-gradient(#0a2837,#0a2837) 0 var(--ds)/100% 1.6px no-repeat,#f6e7d7}
/* the legs belong to the art box (the desk runs out of the window on the right) – they are drawn by r41-x50-abend.js as .x50-legs */
#familie .x50-legs{position:absolute;left:0;right:0;bottom:0;height:var(--leg);pointer-events:none}
#familie .x50-legs i{position:absolute;bottom:0;width:15px;height:100%;box-sizing:border-box;border:1.6px solid #0a2837;border-top:0;background:#f1e0cd;
  -webkit-mask-image:linear-gradient(#000 0,rgba(0,0,0,.5) 45%,transparent 100%);mask-image:linear-gradient(#000 0,rgba(0,0,0,.5) 45%,transparent 100%)}
#familie .x50-legs i:first-child{left:20px}
#familie .x50-legs i:last-child{right:70px}
/* a real desk picture (r50-tisch.png → x50-tisch.webp), if there is one: it brings its own legs */
#familie .x50-eve.has-tisch .x50-desk{border:0;border-radius:0;height:calc(var(--dimg-h) * .76);bottom:calc(var(--leg) + var(--dh) - var(--dimg-h) * .76);
  background:var(--x50-tisch) 0 calc(var(--dimg-h) * -.24)/auto var(--dimg-h) no-repeat;
  -webkit-mask-image:linear-gradient(#000 0,#000 30%,transparent 100%);mask-image:linear-gradient(#000 0,#000 30%,transparent 100%)}
#familie .x50-eve.has-tisch .x50-legs{display:none}

/* --- Furkan at the desk (stop-motion sprite 5 x 2 cells; the tabletop edge is at 360 of 480 in every cell) --------------- */
#familie .x50-fig{position:absolute;z-index:2;left:-8px;bottom:calc(var(--leg) + var(--dh) - var(--F) * .25);width:var(--F);height:var(--F);pointer-events:none;
  background:var(--x50-sprite) 0 0/500% 200% no-repeat}

/* --- the lamp of 17:00 (same drawing, mirrored: it looks to the right onto the tangle); a button, state shared with the top one --- */
#familie .x50-lamp{position:absolute;z-index:3;left:var(--lamp-l);bottom:calc(var(--stand) - var(--lh) * .11);width:var(--lw);height:var(--lh);--ab-bulb:calc(var(--lh) * .146);
  padding:0;margin:0;border:0;border-radius:0;background:none;box-shadow:none;cursor:pointer;color:inherit;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
#familie .x50-lamp:focus{outline:none}
#familie .x50-lamp:focus-visible{outline:2px solid #304ee7;outline-offset:6px;border-radius:6px}
html.ab-pointer #familie .x50-lamp:focus-visible{outline:none}
#familie .x50-lamp-art{position:absolute;inset:0;display:block;pointer-events:none}
#familie .x50-lamp-art img{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;transform:scaleX(-1);pointer-events:none}
#familie .x50-lamp-art .x50-on{opacity:0;transition:opacity .2s ease}
#familie .x50-lamp.is-on .x50-on{opacity:1}
#familie .x50-lamp.is-flicker .x50-on{animation:ab-flick .26s steps(1,end) both}
#familie .x50-lamp .ab-bulb{left:79.6%}
#familie .x50-lamp .ab-shine{left:61%;rotate:-30deg}
#familie .x50-lamp.is-on :is(.ab-bulb,.ab-shine){opacity:1}
/* the cord is a copy of the one on the 17:00 card (r41-x50-abend.js), hung on the mirrored shade */
#familie .x50-lamp .ab-cord{--ab-cord:calc(var(--lh) * .3);left:61.6%;transition:none}
#familie .x50-lamp.is-pull .ab-cord{animation:ab-pull .42s cubic-bezier(.3,.7,.4,1)}
@media (hover:hover) and (prefers-reduced-motion:no-preference){#familie .x50-lamp:not(.is-pull):hover .ab-cord{animation:ab-sway 1.8s ease-in-out}}
/* the light from the shade down onto the tangle: only when the lamp is on (under the lamp, never over text) */
#familie .x50-light{position:absolute;z-index:1;left:calc(var(--lamp-l) + var(--lw) * .796 - var(--lh) * .3);bottom:calc(var(--stand) - var(--lh) * .02);
  width:calc(var(--lh) * .78);height:calc(var(--lh) * .66);transform-origin:50% 0;transform:skewX(13deg);opacity:0;transition:opacity .45s ease;
  background:radial-gradient(ellipse 60% 100% at 50% 0,rgba(255,228,160,.5),rgba(255,214,140,.2) 55%,rgba(255,205,120,0) 100%);
  clip-path:polygon(43% 0,57% 0,100% 100%,0 100%)}
#familie .x50-eve.is-lit .x50-light{opacity:1}

/* --- the thread on the desk and the tangle (the only way on to /projekt) ------------------------------------------------ */
#familie .x50-thread{position:absolute;left:0;top:0;z-index:2;overflow:visible;pointer-events:none}
#familie .x50-thread .ab-l-core{stroke-width:2}
#familie .x50-ball{position:absolute;z-index:4;display:block;left:calc(var(--ball-cx) - var(--bs) / 2);bottom:calc(var(--stand) - var(--bs) * .06);width:var(--bs);height:var(--bs);
  cursor:pointer;will-change:transform;-webkit-tap-highlight-color:transparent;border-radius:50%}
#familie .x50-ball:focus{outline:none}
#familie .x50-ball:focus-visible{outline:2px solid #304ee7;outline-offset:3px}
html.ab-pointer #familie .x50-ball:focus-visible{outline:none}
#familie .x50-ball-img{display:block;width:100%;height:100%;max-width:none;filter:drop-shadow(0 4px 3px rgba(60,25,10,.28));pointer-events:none}

/* --- phone: words first, the desk with all of it under them ------------------------------------------------------------- */
@media screen and (max-width:720px){
  #familie .x50-eve{--lh:128px;--F:150px;--leg:48px;--dh:18px;--ds:7.5px;--bs:46px;--dimg-h:150px;
    --lamp-l:calc(var(--F) * .74 + 6px);--ball-cx:calc(var(--lamp-l) + var(--lw) * .8 + 36px);--art-h:calc(var(--leg) + var(--dh) + 160px);
    min-height:0;margin-top:44px;padding:0 0 calc(var(--art-h) + 6px) 0}
  #familie .x50-eve:not(.has-fig){--lamp-l:10px}
  #familie .x49-eve-pre{font-size:19px}
  #familie .x49-eve-h{font-size:19px}
  #familie .x49-key li,#familie .x49-eve-p{font-size:14.5px}
  #familie .x49-key li{grid-template-columns:30px minmax(0,1fr)}
  #familie .x49-sw{width:26px}
  #familie .x50-legs i:last-child{right:30px}
}

/* --- Leichter lesen: plain words, no handwriting; the picture stays (no movement: r41-x50-abend.js) -------------------- */
html[data-read=on] #familie .x49-eve-pre{font-family:inherit;font-style:normal;font-size:17px;font-weight:700;letter-spacing:0;color:inherit}
html[data-read=on] #familie :is(.x49-key li,.x49-eve-p){font-size:17px;line-height:1.6;color:#253238}
@media (forced-colors:active){
  #familie .x50-art{display:none}
  #familie .x50-eve{min-height:0}
  #familie .x50-ball{position:static;display:inline-block;width:auto;height:auto}
  #familie .x50-ball-img{display:none}
  #familie .x50-lamp{display:none}
}
@media print{
  #familie .x50-art,#familie .x50-lamp,#familie .x50-ball,#familie .x50-fig{display:none}
  #familie .x50-eve{padding:0;min-height:0;margin-top:16px}
}

/* --- dark: desk and lamp keep their drawn colours (as the lamp at 17:00) on the dark paper, the light is a real glow --------- */
html[data-theme=dark] body #familie .x50-desk{border-color:#8a9aa3;background:linear-gradient(#2c363d,#2c363d) 0 0/100% var(--ds) no-repeat,linear-gradient(#8a9aa3,#8a9aa3) 0 var(--ds)/100% 1.6px no-repeat,#222b31/*dk:fest*/}
html[data-theme=dark] body #familie .x50-legs i{border-color:#8a9aa3;background:#222b31/*dk:fest*/}
html[data-theme=dark] body #familie .x50-eve.has-tisch .x50-desk{background:var(--x50-tisch) 0 calc(var(--dimg-h) * -.24)/auto var(--dimg-h) no-repeat;border:0/*dk:fest*/}
html[data-theme=dark] #familie .x50-lamp-art img{/*dk:fest*/filter:none}
html[data-theme=dark] #familie .x50-light{/*dk:fest*/background:radial-gradient(ellipse 60% 100% at 50% 0,rgba(255,226,150,.42),rgba(255,206,120,.16) 55%,rgba(255,200,110,0) 100%)}
html[data-theme=dark] #familie .x50-ball-img{/*dk:fest*/filter:drop-shadow(0 5px 5px rgba(0,0,0,.55))}
html[data-theme=dark] #familie .x50-fig{/*dk:fest*/filter:none}
html[data-theme=dark] #familie .x50-thread{/*dk:fest*/filter:none}
