/* ============================================================
   THE WEEKLY SUMMARY, IN GLASS (2.8.85)
   ============================================================
   The story is a glass box over the photo for the time of day, like Daily's boxes, and the three old backgrounds
   become three glasses: light (the normal one), olive (tasks) and smoked (the cover). Only the material changes: the
   charts, the animations and their timings are those of review.css (2.8.26, 2.8.49), untouched.
   Hangs from html.glass and from the summary's layer (.wr-ov), which sits outside main.

   The photo: --wr-foto, the time-of-day photo in charge when the summary opens (wrPhoto, in app/review.js). With the
   dark theme, the light photos somewhat darker (.wr-photo-light), like the ones behind in glass.css.

   The box's glass is not backdrop-filter: under everything the box carries two layers, ::before with the blurred
   photo, placed exactly where the one behind falls, and ::after with its background's tint. The curtain that comes in
   when changing screen (.wr-wipe) carries the same two layers with the new tint, so it fully covers the previous one
   (two translucent glasses, one on top of the other, would blend). Where the photo falls comes from vw and vh: the box
   fills the screen on the iPhone, and on desktop it is always centred, 420 px wide.
   At night (html.gl-night, even with the light theme), the light and the smoked glass turn dark, as everywhere else. */

/* ---------- the tints, the edge and the photo (light glass; dark with the dark theme or at night) ---------- */
html.glass .wr-ov{--wr-img:var(--wr-foto,var(--vd-foto-a));--wr-luz:linear-gradient(180deg,rgba(255,255,255,.09),rgba(255,255,255,0) 42%);
  --wr-filtro:blur(26px) saturate(1.6) var(--wr-osc,);
  --wr-t-normal:var(--wr-luz),rgba(255,255,255,.62);
  --wr-t-oliva:var(--wr-luz),rgba(86,110,64,.78);
  --wr-t-carbon:var(--wr-luz),rgba(20,23,24,.7);
  --wr-filo:inset 0 0 0 1px rgba(255,255,255,.66),inset 0 1px 0 rgba(255,255,255,.92);
  background:var(--vd-tono,#6f8987);-webkit-backdrop-filter:none;backdrop-filter:none}
:root[data-theme="dark"].glass .wr-ov.wr-photo-light{--wr-osc:brightness(.74) saturate(.92)}
:is(:root[data-theme="dark"].glass,html.glass.gl-night) .wr-ov{--wr-filtro:blur(26px) saturate(1.5) var(--wr-osc,);
  --wr-t-normal:var(--wr-luz),rgba(8,12,10,.56);
  --wr-t-carbon:var(--wr-luz),rgba(4,6,7,.66);
  --wr-filo:inset 0 0 0 1px rgba(255,255,255,.16),inset 0 1px 0 rgba(255,255,255,.24)}
/* the olive follows the theme, like its text (review.css): with the dark one, light olive with charcoal text */
:root[data-theme="dark"].glass .wr-ov{--wr-t-oliva:var(--wr-luz),rgba(157,190,134,.8)}

/* the photo behind the box (not visible on the iPhone: the box fills the screen) */
html.glass .wr-ov::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:var(--wr-img) center 40%/cover no-repeat;filter:var(--wr-osc,none)}

/* ---------- the box: where the photo falls, and its two layers ---------- */
html.glass .wr-ov .wr-box{--wr-fw:max(100vw,75vh);--wr-fh:max(100vh,133.334vw);   /* the photo is 3:4: the size it takes with «cover» */
  --wr-fx:calc((100vw - var(--wr-fw))/2);--wr-fy:calc((100vh - var(--wr-fh))*.4)}
html.glass .wr-ov :is(.wr-box,.wr-wipe){background:transparent}
html.glass .wr-ov .wr-wipe{z-index:1}
html.glass .wr-ov :is(.wr-box,.wr-wipe)::before{content:"";position:absolute;inset:-40px;z-index:0;pointer-events:none;   /* 40 px extra: the edge of the blur falls outside */
  background:var(--wr-img) no-repeat;background-size:var(--wr-fw) var(--wr-fh);
  background-position:calc(var(--wr-fx) + 40px) calc(var(--wr-fy) + 40px);filter:var(--wr-filtro)}
html.glass .wr-ov :is(.wr-box,.wr-wipe)::after{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;border-radius:inherit;
  background:var(--wr-t-normal);box-shadow:var(--wr-filo)}
html.glass .wr-ov :is(.wr-box.oliva,.wr-wipe.oliva)::after{background:var(--wr-t-oliva)}
html.glass .wr-ov :is(.wr-box.carbon,.wr-wipe.carbon)::after{background:var(--wr-t-carbon)}

/* ---------- the inks inside the light glass (the olive and the charcoal ones are those of review.css) ---------- */
html.glass .wr-ov .wr-box:not(.es-oliva,.es-carbon){--ink:#1A1611;--ink2:#5a4d3c;--ink3:rgba(26,22,17,.56);--acc:#566E40;--acc2:#3D5230;--trk:rgba(26,22,17,.1);
  --card:rgba(255,255,255,.5);--cardb:rgba(255,255,255,.78)}
:is(:root[data-theme="dark"].glass,html.glass.gl-night) .wr-ov .wr-box:not(.es-oliva,.es-carbon){--ink:#fff;--ink2:rgba(255,255,255,.78);--ink3:rgba(255,255,255,.6);
  --acc:#9DBE86;--acc2:#C9DEBA;--trk:rgba(255,255,255,.15);--card:rgba(255,255,255,.1);--cardb:rgba(255,255,255,.18)}
html.glass .wr-ov .wr-box.es-oliva{--card:rgba(255,255,255,.16);--cardb:rgba(255,255,255,.3);--trk:rgba(251,248,241,.26)}   /* with the dark theme, the review.css ones rule */
html.glass .wr-ov .wr-box.es-carbon{--card:rgba(255,255,255,.1);--cardb:rgba(255,255,255,.18)}

/* ---------- the pieces: labels like Daily's titles, glass boxes and capsules ---------- */
html.glass .wr-ov .wr-k{font:700 17px/1.25 var(--font-head);letter-spacing:-.01em;text-transform:none;margin-bottom:12px}
html.glass .wr-ov .wr-k0{font:600 13.5px var(--font-body);letter-spacing:0;text-transform:none;color:var(--ink2)}
html.glass .wr-ov .wr-pause{top:calc(40px + env(safe-area-inset-top));padding:5px 12px;border-radius:999px;font:600 12.5px var(--font-body);letter-spacing:0;text-transform:none;
  color:var(--ink);background:var(--wr-luz),var(--card);box-shadow:inset 0 0 0 1px var(--cardb)}
html.glass .wr-ov :is(.wr-chips span,.wr-rec,.wr-fo-row){border:none;box-shadow:inset 0 0 0 1px var(--cardb);background:var(--wr-luz),var(--card)}
html.glass .wr-ov .wr-rec{border-radius:22px}
html.glass .wr-ov .wr-fo-row{border-radius:20px}
html.glass .wr-ov .wr-rec .ic{background:var(--olive-fill);color:var(--on-olive);text-shadow:var(--on-olive-sombra)}   /* the icon, in an olive circle, like the one of Daily's review */
:root[data-theme="dark"].glass .wr-ov .wr-rec .ic{color:#17191A}
html.glass .wr-ov .wr-grid .wr-wday{border:none;box-shadow:inset 0 0 0 1px var(--cardb);border-radius:10px}
/* Sí / A medias / No (Yes / Partly / No): a single line each, so capsules */
html.glass .wr-ov .wr-ans button{border:none;border-radius:999px;background:var(--wr-luz),var(--card);color:var(--ink);box-shadow:inset 0 0 0 1px var(--cardb)}
html.glass .wr-ov .wr-ans button.on{background:var(--olive-fill);color:var(--on-olive);text-shadow:var(--on-olive-sombra);box-shadow:none}
:root[data-theme="dark"].glass .wr-ov .wr-ans button.on{color:#17191A}
html.glass .wr-ov .wr-fo-streak{color:var(--acc)}

/* ---------- on desktop: the story card over the photo, and the arrows in glass circles ---------- */
@media(min-width:700px){
  html.glass .wr-ov .wr-box{--wr-bh:min(800px,calc(100vh - 48px));--wr-fx:calc((420px - var(--wr-fw))/2);
    --wr-fy:calc((100vh - var(--wr-fh))*.4 - (100vh - var(--wr-bh))/2);
    height:var(--wr-bh);border:none;border-radius:26px;box-shadow:0 2px 8px rgba(0,0,0,.12),0 24px 60px rgba(0,0,0,.26)}
  html.glass .wr-ov .wr-arr{border:none;color:var(--vd-tinta);background:var(--wr-luz),var(--vd-caja);
    -webkit-backdrop-filter:var(--vd-blur);backdrop-filter:var(--vd-blur);box-shadow:inset 0 0 0 1px var(--vd-borde),inset 0 1px 0 var(--vd-brillo)}
}
