:root {
  --ink: #26343d;
  --soft: rgba(38, 52, 61, .66);
  --faint: rgba(38, 52, 61, .3);
  --accent: #4a86c5;           /* one calm blue; no reds or alarm colours anywhere */
  --tape: #f2c6d2;             /* each month's flower sets its own tape colour */
  --paper: rgba(255, 255, 255, .6);
  --edge: rgba(255, 255, 255, .8);
  --sans: "Jost", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: var(--sans); font-weight: 400; color: var(--ink); overflow: hidden; background: #5d7fa3; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Test desktop (swap the image freely) */
.backdrop { position: fixed; inset: 0; background: #5d7fa3 center / cover no-repeat; }
.wallpapers { position: fixed; left: 14px; bottom: 14px; z-index: 20; display: flex; align-items: center; gap: 6px; padding: 5px; background: rgba(255,255,255,.55); backdrop-filter: blur(10px); border-radius: 999px; font-size: 12px; font-weight: 600; }
.wallpapers button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(30,40,50,.25); background-size: cover; background-position: center; }
.wallpapers button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent); }
.wallpapers .up { width: auto; height: 22px; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,.8); border: 0; color: var(--ink); }

/* Fixed design size, scaled to the window */
.stage { position: fixed; left: 50%; top: 50%; width: 1280px; height: 800px; transform: translate(-50%, -50%) scale(var(--s, 1)); }

/* ---------- Washi tape: a plain vertical strip with sharp corners, half on the card, half above it ---------- */
.tape { position: absolute; top: -26px; left: 22px; width: 26px; height: 62px; background: var(--tape); opacity: .94; z-index: 5; pointer-events: none;
  box-shadow: 0 1px 2px rgba(30, 40, 50, .18); }

/* ---------- Flower card: white, small, draggable ---------- */
.widget { position: absolute; left: 1010px; top: 440px; width: 222px; height: 296px; background: #fff; border-radius: 14px;
  box-shadow: 0 16px 36px rgba(25, 40, 60, .26); cursor: grab; touch-action: none; user-select: none; }
.widget.drag, .cal.drag { cursor: grabbing; box-shadow: 0 24px 50px rgba(25, 40, 60, .34); }
.wtext { position: absolute; left: 22px; top: 30px; right: 18px; text-align: left; }
.cap { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }
.wday { font-size: 50px; font-weight: 700; line-height: 1; margin-top: 2px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.wstage { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.fbox { position: absolute; left: 14px; right: 14px; top: 118px; height: 128px; display: flex; align-items: flex-end; justify-content: flex-end; pointer-events: none; }
.flower { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; animation: bloomIn .6s ease both; }
@keyframes bloomIn { from { opacity: 0; transform: scale(.94); } }
.wact { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; gap: 6px; }
.wact button { flex: 1; font-size: 13px; font-weight: 600; padding: 7px 0; border-radius: 999px; background: #f3f5f7; color: var(--ink); transition: background .2s; }
.wact button:hover { background: #e6ebef; }
.wact button[aria-expanded="true"] { background: var(--ink); color: #fff; }

/* preview scrubber, tucked under the card */
.preview { position: absolute; left: 0; right: 0; top: calc(100% + 12px); display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px;
  background: rgba(255,255,255,.82); font-size: 12px; font-weight: 600; cursor: default; }
.preview input { flex: 1; min-width: 0; accent-color: var(--accent); }
.preview output { min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; }
.preview button { width: 22px; height: 22px; border-radius: 50%; font-size: 16px; line-height: 1; }
.preview button:hover { background: rgba(38,52,61,.1); }

/* ---------- Calendar card: glass, opens on request ---------- */
.cal { position: absolute; left: 300px; top: 30px; width: 660px; height: 750px; padding: 34px 32px 22px; border-radius: 20px;
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--edge);
  -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: 0 30px 70px rgba(25, 40, 60, .28); animation: rise .35s cubic-bezier(.3,.8,.3,1); }
.cal[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; cursor: grab; touch-action: none; user-select: none; }
.title .cap { margin-bottom: 4px; font-size: 13px; }
.title h1 { font-size: 54px; font-weight: 700; line-height: 1.05; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.title .sub { margin-top: 4px; font-size: 15px; font-weight: 600; color: var(--ink); }
.title .nav { display: inline-flex; gap: 2px; margin-left: 12px; vertical-align: middle; }
.nav button { width: 30px; height: 30px; border-radius: 50%; font-size: 22px; font-weight: 400; line-height: 1; color: var(--soft); transition: background .2s; }
.nav button:hover { background: rgba(255,255,255,.7); }

.tools { display: flex; align-items: center; gap: 10px; }
.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: 170px; height: 34px; border-radius: 999px; background: rgba(255,255,255,.5); border: 1px solid rgba(38,52,61,.1); }
.seg button { position: relative; z-index: 1; font-size: 13px; font-weight: 500; color: var(--soft); transition: color .25s; }
.seg button[aria-selected="true"] { color: var(--ink); font-weight: 600; }
.seg .thumb { position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc(50% - 2px); border-radius: 999px; background: #fff; box-shadow: 0 2px 8px rgba(30,45,60,.12); transition: transform .3s cubic-bezier(.3,.8,.3,1); }
.seg:has(#tabWeeks[aria-selected="true"]) .thumb { transform: translateX(100%); }
.x { width: 32px; height: 32px; border-radius: 50%; font-size: 22px; color: var(--soft); transition: background .2s; }
.x:hover { background: rgba(255,255,255,.7); }

.body { flex: 1; min-height: 0; margin-top: 20px; display: flex; flex-direction: column; }
.foot { padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12.5px; font-weight: 500; color: var(--soft); min-height: 38px; }

/* ---------- Month ---------- */
.dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dow span { text-align: center; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); padding: 4px 0 8px; }
.mgrid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { position: relative; min-width: 0; min-height: 0; border-radius: 10px; padding: 6px 7px 7px; text-align: left; display: flex; flex-direction: column; gap: 4px; overflow: visible;
  background: rgba(255,255,255,.4); border: 1px solid rgba(255,255,255,.7); transition: background .2s; }
.day:hover { background: rgba(255,255,255,.75); }
.day .n { font-size: 13px; font-weight: 500; line-height: 1; }
.day.out { background: transparent; border-color: transparent; pointer-events: none; }
.day.out .n { color: var(--faint); font-weight: 400; }
.day.today { border: 1.5px solid var(--accent); background: rgba(255,255,255,.7); }
.day.today .n { color: var(--accent); font-weight: 700; }

/* postage stamp: white border, perforated edge, soft shadow (the shadow sits on the wrapper because the mask clips the stamp) */
.swrap { flex: 1; min-height: 0; filter: drop-shadow(0 1.5px 2px rgba(20, 30, 40, .28)); }
.stamp { --r: 3.2px; width: 100%; height: 100%; padding: 6px; background: #fff;
  -webkit-mask: radial-gradient(circle var(--r) at 5px 0, #0000 96%, #000) 0 0 / 10px 100% repeat-x, radial-gradient(circle var(--r) at 5px 100%, #0000 96%, #000) 0 0 / 10px 100% repeat-x, radial-gradient(circle var(--r) at 0 5px, #0000 96%, #000) 0 0 / 100% 10px repeat-y, radial-gradient(circle var(--r) at 100% 5px, #0000 96%, #000) 0 0 / 100% 10px repeat-y;
  -webkit-mask-composite: source-in;
          mask: radial-gradient(circle var(--r) at 5px 0, #0000 96%, #000) 0 0 / 10px 100% repeat-x, radial-gradient(circle var(--r) at 5px 100%, #0000 96%, #000) 0 0 / 10px 100% repeat-x, radial-gradient(circle var(--r) at 0 5px, #0000 96%, #000) 0 0 / 100% 10px repeat-y, radial-gradient(circle var(--r) at 100% 5px, #0000 96%, #000) 0 0 / 100% 10px repeat-y;
          mask-composite: intersect; }
.stamp img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slot { flex: 1; min-height: 0; display: grid; place-items: center; color: var(--soft); font-size: 20px; font-weight: 300; opacity: 0; transition: opacity .2s; }
.day:hover .slot, .day.today .slot { opacity: 1; }
.day .rm { position: absolute; top: 3px; right: 3px; width: 17px; height: 17px; border-radius: 50%; font-size: 13px; line-height: 17px; text-align: center; background: rgba(255,255,255,.95); color: var(--ink); opacity: 0; z-index: 2; transition: opacity .2s; }
.day:hover .rm { opacity: 1; }
.day.drop { background: #fff; border-color: var(--accent); }

/* ---------- Weeks ---------- */
.stats { display: flex; gap: 28px; font-size: 13px; font-weight: 400; color: var(--soft); margin-bottom: 14px; }
.stats b { display: block; font-size: 20px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.wgrid { display: flex; flex-direction: column; gap: 6px; position: relative; }
.decade { position: relative; display: grid; grid-template-columns: repeat(52, 9px); grid-auto-rows: 4px; gap: 2px; margin-left: 26px; }
.decade .age { position: absolute; left: -26px; top: -4px; font-size: 10px; font-weight: 500; color: var(--soft); }
.w { background: rgba(38, 52, 61, .12); border-radius: 1px; }
.w.lived { background: rgba(38, 52, 61, .6); }
.w.now { background: #ffd24a; box-shadow: 0 0 10px 3px rgba(255, 196, 60, .9); position: relative; z-index: 2; animation: glow 2.4s ease-in-out infinite; }
.w.hot { outline: 1.5px solid var(--ink); outline-offset: 1px; }
@keyframes glow { 50% { box-shadow: 0 0 18px 6px rgba(255, 196, 60, 1); } }
.legend { display: flex; gap: 16px; font-size: 11.5px; font-weight: 500; color: var(--soft); }
.legend i { display: inline-block; width: 9px; height: 4px; margin-right: 6px; vertical-align: middle; border-radius: 1px; }
.legend .a { background: rgba(38,52,61,.6); } .legend .b { background: var(--accent); } .legend .c { background: rgba(38,52,61,.12); outline: 1px solid rgba(38,52,61,.2); }
.adj { display: flex; align-items: center; gap: 14px; }
.adj label { display: flex; align-items: center; gap: 6px; }
.adj input[type=date] { font: inherit; font-size: 12px; padding: 3px 6px; border: 1px solid rgba(38,52,61,.2); border-radius: 6px; background: rgba(255,255,255,.7); color: var(--ink); }
.adj input[type=range] { width: 90px; accent-color: var(--accent); }
.link { font-size: 12.5px; font-weight: 500; color: var(--soft); text-decoration: underline; text-underline-offset: 3px; }
.tipline { margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--ink); min-height: 16px; }
body.mask .big, body.mask .stats b, body.mask .tipline { filter: blur(10px); }

[hidden] { display: none !important; }
.legend span, .link, .stats span { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.wtext { top: 44px; }
.fbox { top: 138px; height: 108px; }
.cal { padding-top: 46px; }
.cal { height: 772px; top: 20px; }
.body { margin-top: 14px; }
.stats { margin-bottom: 10px; gap: 30px; }
.stats b { font-size: 18px; }
.wgrid { gap: 4px; }
.decade { gap: 1.5px 2px; }

/* ---- round 3: slender tape, sharp edges, smaller type ---- */
.tape { width: 14px; height: 42px; top: -18px; left: 20px; }
.widget, .cal, .day, .preview, .seg, .seg .thumb, .wact button, .nav button, .x, .adj input[type=date] { border-radius: 0; }
.widget { height: 262px; }
.wtext { top: 34px; }
.cap { font-size: 11px; }
.wday { font-size: 30px; }
.fbox { top: 96px; height: 120px; }
.cal { padding-top: 40px; }
.title .cap { font-size: 11.5px; }
.title h1 { font-size: 38px; }
.title .sub { font-size: 13px; margin-top: 2px; }
.stats b { font-size: 16px; }
.seg { height: 32px; }

@keyframes bloomIn { from { opacity: 0; } }
.flower { animation-duration: .45s; }
.widget { height: 292px; }
.fbox { top: 86px; height: 158px; left: 10px; right: 10px; }

/* ---- round 4: glass controls, clearer glass card, systematic weeks footer ---- */
body.mask .big, body.mask .stats b, body.mask .tipline { filter: none; }

.cal {
  /* the user's wallpaper is unknown, so the glass keeps a light floor: dark ink stays readable even over a dark picture */
  background: linear-gradient(135deg, rgba(255,255,255,.54), rgba(255,255,255,.4));
  border: 1px solid rgba(255,255,255,.75);
  -webkit-backdrop-filter: blur(22px) saturate(1.4) brightness(1.7); backdrop-filter: blur(22px) saturate(1.4) brightness(1.7);
  box-shadow: 0 30px 70px rgba(25, 40, 60, .26), inset 0 1px 0 rgba(255,255,255,.85), inset 0 -1px 0 rgba(255,255,255,.25);
}
.day { background: rgba(255,255,255,.26); border-color: rgba(255,255,255,.6); }
.day:hover { background: rgba(255,255,255,.55); }

/* every control is glass: a frosted gradient, a bright rim, a soft lift */
.gbtn, .seg, .x, .nav button, .wact button, .preview {
  background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,.14));
  border: 1px solid rgba(255,255,255,.85);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 4px 10px rgba(30,50,70,.12);
  -webkit-backdrop-filter: blur(10px) saturate(1.4); backdrop-filter: blur(10px) saturate(1.4);
  color: var(--ink);
}
.gbtn { padding: 7px 14px; font-size: 12.5px; font-weight: 600; transition: background .2s, transform .2s; }
.gbtn:hover, .x:hover, .nav button:hover, .wact button:hover { background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.28)); transform: translateY(-1px); }
.gbtn[aria-expanded="true"], .gbtn[aria-pressed="true"], .wact button[aria-expanded="true"] {
  background: linear-gradient(180deg, rgba(120,172,225,.55), rgba(120,172,225,.22)); color: var(--ink); }
.seg .thumb { background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.55)); border: 1px solid #fff; box-shadow: 0 3px 10px rgba(30,50,70,.16); border-radius: 0; }
.seg { border-radius: 0; }
.nav button { width: 28px; height: 28px; }
.x { width: 32px; height: 32px; }

/* on the white flower card the glass needs a faint tint to show up */
.wact button { background: linear-gradient(180deg, rgba(150,190,230,.34), rgba(150,190,230,.12)); box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 0 0 1px rgba(110,150,190,.22), 0 3px 8px rgba(30,50,70,.1); }
.wact button:hover { background: linear-gradient(180deg, rgba(150,190,230,.5), rgba(150,190,230,.2)); }
.wact button[aria-expanded="true"] { background: linear-gradient(180deg, rgba(110,165,220,.6), rgba(110,165,220,.3)); }

/* weeks footer: left = key and hover line, right = actions; settings open as a popover above */
.foot { position: relative; align-items: flex-end; }
.foot .fl { display: grid; gap: 6px; }
.foot .acts { display: flex; gap: 8px; }
.tipline { margin-top: 0; min-height: 17px; }
.stats.quiet { font-size: 13px; font-weight: 500; color: var(--soft); margin-bottom: 14px; min-height: 40px; display: flex; align-items: center; }
.pop { position: absolute; right: 0; bottom: calc(100% + 10px); width: 300px; padding: 14px 16px 16px; display: grid; gap: 12px; z-index: 6;
  background: linear-gradient(135deg, rgba(255,255,255,.7), rgba(255,255,255,.45)); border: 1px solid rgba(255,255,255,.9);
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); box-shadow: 0 16px 36px rgba(25,40,60,.22); }
.pop .cap { font-size: 11px; }
.pop .row { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.pop .row input[type=date] { font: inherit; font-size: 13px; font-weight: 500; padding: 5px 8px; border: 1px solid rgba(38,52,61,.2); background: rgba(255,255,255,.7); color: var(--ink); }
.pop .born { display: grid; grid-template-columns: 52px 1fr 70px; gap: 6px; }
.pop select, .pop .born input { font: inherit; font-size: 13px; font-weight: 500; padding: 5px 4px; border: 1px solid rgba(38,52,61,.2); border-radius: 0; background: rgba(255,255,255,.8); color: var(--ink); min-width: 0; }
.pop .born input { width: 100%; box-sizing: border-box; font-variant-numeric: tabular-nums; }
.pop select:focus-visible, .pop .born input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pop .ctl { display: flex; align-items: center; gap: 10px; }
.pop .ctl input { flex: 1; min-width: 0; accent-color: var(--accent); }
.pop output { min-width: 52px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---- round 5: softly rounded translucent glass buttons, a bare close mark, flower nudged up ---- */
.gbtn, .seg, .nav button, .wact button, .preview { border-radius: 9px; }
.seg .thumb { border-radius: 7px; }
.preview { border-radius: 10px; }

/* more see-through: a whisper of white, a bright rim, the blur does the rest */
.gbtn, .seg, .nav button, .preview {
  background: linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,.08));
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 3px 8px rgba(30,50,70,.1);
}
.gbtn:hover, .nav button:hover { background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,.18)); }
.gbtn[aria-expanded="true"], .gbtn[aria-pressed="true"] { background: linear-gradient(180deg, rgba(120,172,225,.38), rgba(120,172,225,.12)); }
.seg .thumb { background: linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,.28)); border: 1px solid rgba(255,255,255,.9); box-shadow: 0 2px 8px rgba(30,50,70,.12); }

/* flower card buttons: translucent too; a faint blue rim keeps them findable on white */
.wact button {
  background: linear-gradient(180deg, rgba(150,190,230,.2), rgba(150,190,230,.05));
  border: 1px solid rgba(110,160,210,.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 3px 8px rgba(30,50,70,.07);
}
.wact button:hover { background: linear-gradient(180deg, rgba(150,190,230,.34), rgba(150,190,230,.12)); }
.wact button[aria-expanded="true"] { background: linear-gradient(180deg, rgba(110,165,220,.42), rgba(110,165,220,.16)); border-color: rgba(90,145,205,.6); }

/* the close mark is just a cross, no box */
.x { background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; width: 28px; height: 28px; font-size: 24px; color: var(--soft); transform: none; }
.x:hover { background: none; color: var(--ink); transform: none; }

/* flower sits a touch higher on the card */
.fbox { top: 76px; height: 152px; }

/* ---- round 6: liquid-glass controls (clear fill, bright fading rim, glow from below, flower-matched tint) ---- */
:root { --tint: 138,182,236; --btn-r: 11px; }

.gbtn, .wact button, .nav button, .seg, .preview {
  position: relative; border: 0; border-radius: var(--btn-r); color: var(--ink);
  background:
    radial-gradient(130% 95% at 50% 118%, rgba(255,255,255,.6) 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.04)),
    rgba(var(--tint), .17);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.85), inset 0 -9px 12px -7px rgba(255,255,255,.55), 0 8px 18px rgba(30,50,70,.12), 0 1px 3px rgba(30,50,70,.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.7) brightness(1.06); backdrop-filter: blur(16px) saturate(1.7) brightness(1.06);
  transition: background .25s, transform .2s, box-shadow .25s;
}
/* the rim: bright at the top-left and bottom-right, a tinted dip between, like a glass edge catching light */
.gbtn::before, .wact button::before, .nav button::before, .seg::before, .preview::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.3px; pointer-events: none;
  background: linear-gradient(155deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.4) 30%, rgba(var(--tint), .45) 64%, rgba(255,255,255,.92) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.gbtn:hover, .wact button:hover, .nav button:hover {
  background:
    radial-gradient(130% 95% at 50% 118%, rgba(255,255,255,.75) 0%, rgba(255,255,255,0) 62%),
    linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,.08)),
    rgba(var(--tint), .27);
  transform: translateY(-1px);
}
.gbtn[aria-expanded="true"], .gbtn[aria-pressed="true"], .wact button[aria-expanded="true"] {
  background:
    radial-gradient(130% 95% at 50% 118%, rgba(255,255,255,.5) 0%, rgba(255,255,255,0) 60%),
    rgba(var(--tint), .42);
}
.seg .thumb {
  border: 0; border-radius: calc(var(--btn-r) - 3px);
  background: radial-gradient(130% 95% at 50% 120%, rgba(255,255,255,.7), rgba(255,255,255,0) 60%), linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.28)), rgba(var(--tint), .22);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.9), inset 0 -6px 9px -5px rgba(255,255,255,.7), 0 3px 9px rgba(30,50,70,.14);
}
.nav button, .x { width: 28px; height: 28px; }
.gbtn, .wact button { font-weight: 600; }

/* ---- round 7: iPhone-round buttons, softly rounded day boxes, a plain plus in every empty day ---- */
:root { --btn-r: 999px; }
.nav button { border-radius: 50%; }
.seg, .seg .thumb, .preview { border-radius: 999px; }
.day { border-radius: 11px; }
.day.today { border-radius: 11px; }
.slot { opacity: .55; font-size: 22px; font-weight: 300; color: var(--soft); }
.day:hover .slot { opacity: 1; color: var(--accent); }
.day.today .slot { opacity: .9; color: var(--accent); }

/* ---- round 8: yellow tape, cross centred with the buttons ---- */
:root { --tape: #f2d96b; }
.tape { opacity: .9; }
.tools { align-items: center; }
.x { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; line-height: 0; font-size: 0; }
.x svg { display: block; }

/* lighter lemon tape */
:root { --tape: #f7ee9e; }
.tape { opacity: .92; }

/* calendar default sits close to the flower card */
.cal { left: 334px; }

/* flower card and calendar share the same top edge */
.widget { top: 20px; }
.cal { top: 20px; }

/* ---- round 9: one set of edges. Flower card: everything on a 22px inset. Calendar: everything on its 32px content edge. ---- */
.widget .tape { left: 22px; }
.wtext { left: 22px; right: 22px; }
.fbox { left: 22px; right: 22px; justify-content: center; }
.wact { left: 22px; right: 22px; bottom: 16px; }
.wact button { flex: 1; padding: 8px 0; }
.cal .tape { left: 32px; }
.x { margin-right: -9px; }                    /* the cross is 32px wide with a 14px glyph: pull it so the glyph, not the box, meets the right edge */
.title h1 { margin-left: -0.04em; }           /* optical: large type sits slightly inside its box */
/* weeks grid: spans the full content width; the age labels hang in the card's left padding, so the grid, the text and the legend share one left edge */
.decade { margin-left: 0; grid-template-columns: repeat(52, 1fr); }
.decade .age { left: -27px; width: 21px; text-align: right; top: -4px; }
/* footer: key + hover line share one row, vertically centred with the two buttons */
.foot { align-items: center; }
.foot .fl { display: flex; align-items: center; gap: 18px; }
.tipline { min-height: 0; margin: 0; white-space: nowrap; }

/* header rhythm: the label sits clear of the big figure; the figure and its caption sit tight together */
.title .cap { margin-bottom: 10px; }
.title h1.big { line-height: .92; }
.title h1.big + .sub { margin-top: -1px; }

/* flower sits slightly off-centre, to the lower right, as before */
.fbox { left: 10px; right: 10px; justify-content: flex-end; }

/* ---- review pass: weekday on the card, Month/Weeks thumb, first-time weeks ---- */
.wdn { margin-top: 3px; font-size: 12px; font-weight: 300; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.seg:has(#tabWeeks) .thumb { transform: none; }
.seg.w:has(#tabWeeks) .thumb { transform: translateX(100%); }
.title .big.ask { font-size: 30px; }
.firstbirth { display: grid; gap: 14px; max-width: 360px; margin-top: 26px; }
.firstbirth .born { display: grid; grid-template-columns: 64px 1fr 88px; gap: 8px; }
.firstbirth select, .firstbirth input { font: inherit; font-size: 14px; font-weight: 500; padding: 8px 8px; border: 1px solid rgba(38,52,61,.2); border-radius: 9px; background: rgba(255,255,255,.8); color: var(--ink); min-width: 0; }
.firstbirth select:focus-visible, .firstbirth input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wgrid.ghost { opacity: .4; margin-top: 22px; pointer-events: none; }

.wallpapers[hidden] { display: none; }

/* ---- round 12: a white calendar with an illustrated glass card at the top ----
   The wallpaper is unknown, so the calendar is solid white paper (like the flower card) and never lets it show through.
   The header sits in its own inset card with a fixed illustration made of simple shapes and lines: overlapping
   see-through petals and a ring of fine lines drawn between points on a circle. The drawing never changes from month to
   month; only its colour does, following the month's flower (--tint). A glassy sheen lies over it, and the Month/Weeks
   switch and the arrows are glass on top. */
:root { --rule: rgba(38, 52, 61, .12); }
.cal {
  background: #fff; border: 0; border-radius: 0;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: 0 30px 70px rgba(18, 28, 38, .32), 0 2px 6px rgba(18, 28, 38, .12);
  padding-top: 14px;
}
.cal > .tape { z-index: 6; }

/* the illustrated card */
.cal .head {
  position: relative; overflow: hidden; isolation: isolate;
  margin: 0 -18px; padding: 22px 22px 20px; min-height: 128px; border-radius: 14px;
  background: linear-gradient(120deg, rgba(var(--tint), .08), rgba(var(--tint), .24));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .75), inset 0 1px 0 rgba(255, 255, 255, .95);
}
.cal .head .illus { position: absolute; right: -70px; top: -96px; width: 380px; height: 380px; transform: none; z-index: -2; pointer-events: none; }
.illus .ln { fill: none; stroke: rgba(var(--tint), .7); stroke-width: .55; }
.illus .pa { fill: rgba(var(--tint), .2); stroke: rgba(255, 255, 255, .75); stroke-width: .9; mix-blend-mode: multiply; }
.illus .pb { fill: rgba(var(--tint), .26); stroke: rgba(255, 255, 255, .7); stroke-width: .8; mix-blend-mode: multiply; }
.illus .pc { fill: rgba(var(--tint), .32); stroke: rgba(255, 255, 255, .6); stroke-width: .7; mix-blend-mode: multiply; }
.illus .core { fill: #fff; opacity: .9; }
/* the glass: a soft sheen over the drawing, brighter at the top-left like light on a pane */
.cal .head::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, .62) 0%, rgba(255, 255, 255, .16) 40%, rgba(255, 255, 255, 0) 62%, rgba(255, 255, 255, .22) 100%);
}
.cal .head .title, .cal .head .tools { position: relative; z-index: 1; }
.cal .body { margin-top: 16px; }

/* glass controls on the card: a little more white so the labels read over the drawing */
.cal .head .seg, .cal .head .nav button {
  background: radial-gradient(130% 95% at 50% 118%, rgba(255,255,255,.7) 0%, rgba(255,255,255,0) 60%), linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,.34));
}

/* the days: taller boxes with a smaller corner, as in the earlier calendar */
.dow { gap: 6px; }
.mgrid { gap: 6px; }
.day { border-radius: 7px; background: #f4f6f8; border: 1px solid rgba(38, 52, 61, .06); }
.day:hover { background: rgba(var(--tint), .16); }
.day.out { background: transparent; border-color: transparent; }
.day.out .n { color: rgba(38, 52, 61, .25); }
.day.today { border-radius: 7px; background: #fff; border: 1.5px solid var(--accent); }
.day.drop { background: #fff; border-color: var(--accent); }

/* weeks and the timeline popover sit on paper too */
.pop { background: #fff; border: 1px solid var(--rule); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 16px 36px rgba(18, 28, 38, .2); }
.firstbirth select, .firstbirth input { background: #fff; }

/* the key matches the grid: this week is the glowing yellow box */
.legend .b { background: #ffd24a; box-shadow: 0 0 6px 1px rgba(255, 196, 60, .8); }

/* ================= round 13: the widget in the app's visual language =================
   The widget is Home's twin on the desktop, so it takes Home's colours: very soft blue days, cornflower for today and
   for labels, lemon for the one action (Calendar) and for the glowing week. Fonts: Fraunces only for the one top line
   (the month), Plus Jakarta Sans for everything else. Buttons keep the original liquid glass, tinted blue; on hover the
   glass fills softly. Only the flower card and the header drawing follow the month's flower. */
:root { --accent: #3d82dc; --sans2: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif; --display: "Fraunces", Georgia, serif; --blue: 61,130,220; --lemon: 248,234,72; }
.cal, .cal button, .cal input, .cal select, .pop, .preview { font-family: var(--sans2); }
/* the calendar card: softly rounded white paper, so it reads on any wallpaper */
.cal { border-radius: 26px; background: rgba(255,255,255,.97); box-shadow: 0 30px 70px rgba(18,28,38,.3), 0 2px 6px rgba(18,28,38,.1), inset 0 0 0 1px rgba(255,255,255,.9); }
.cal .head { border-radius: 18px; }
/* type: the month is the one serif line; everything else sans */
.cal .title h1 { font-family: var(--display); font-weight: 500; font-size: 40px; letter-spacing: -.02em; font-variation-settings: "opsz" 144; }
.cal .title h1.big { font-family: var(--sans2); font-weight: 800; letter-spacing: -.03em; font-variation-settings: normal; }
.cal .title h1.ask { font-family: var(--display); font-weight: 500; }
.cal .title .cap { font-family: var(--sans2); font-size: 11px; font-weight: 600; letter-spacing: .16em; color: rgba(38,52,61,.72); }
.cal .title .sub, .cal .sub { font-family: var(--sans2); font-weight: 500; }
.dow span { font-family: var(--sans2); font-size: 11px; font-weight: 600; letter-spacing: .12em; color: rgba(38,52,61,.55); }
.day .n { font-family: var(--sans2); font-weight: 500; }
.stats, .stats b, .legend, .tipline, #hint, .foot { font-family: var(--sans2); }
.stats b { font-weight: 700; letter-spacing: -.01em; }
/* days: very soft blue, today in cornflower */
.day { border-radius: 10px; background: #f3f8ff; border: 1px solid rgba(var(--blue), .08); transition: background .2s, border-color .2s; }
.day:hover { background: rgba(var(--blue), .1); border-color: rgba(var(--blue), .18); }
.day.out { background: transparent; border-color: transparent; }
.day.today { background: #fff; border: 1.5px solid var(--accent); border-radius: 10px; }
.day.today .n { color: var(--accent); font-weight: 700; }
.day:hover .slot, .day.today .slot { color: var(--accent); }
.day.drop { border-color: var(--accent); background: #fff; }
/* the week you are in glows lemon */
.w.now { background: rgb(var(--lemon)); box-shadow: 0 0 10px 3px rgba(var(--lemon), .9); }
@keyframes glow { 50% { box-shadow: 0 0 18px 6px rgba(var(--lemon), 1); } }
.legend .b { background: rgb(var(--lemon)); box-shadow: 0 0 6px rgba(var(--lemon), .9); }
/* glass buttons: tinted blue (not the flower), the Calendar button lemon */
.gbtn, .nav button, .seg, .preview { --tint: var(--blue); }
.wact button { --tint: var(--lemon); font-family: var(--sans2); font-weight: 600;
  background: radial-gradient(130% 95% at 50% 118%, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 60%), linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.02)), rgba(var(--tint), .62); }
.wact button[aria-expanded="true"] { background: radial-gradient(130% 95% at 50% 118%, rgba(255,255,255,.5) 0%, rgba(255,255,255,0) 60%), rgba(var(--tint), .8); color: var(--ink); }
.gbtn, .wact button, .nav button { overflow: hidden; isolation: isolate; }
.gbtn:hover, .wact button:hover, .nav button:hover { transform: none; }
.gbtn::after, .wact button::after, .nav button::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: linear-gradient(to top, rgba(var(--tint), .14) 0%, rgba(var(--tint), .14) 82%, rgba(var(--tint), 0) 100%); transform: translateY(102%); transition: transform .45s cubic-bezier(.3,.7,.25,1); }
.wact button::after { background: linear-gradient(to top, rgba(var(--tint), .3) 0%, rgba(var(--tint), .3) 82%, rgba(var(--tint), 0) 100%); }
.gbtn:hover::after, .wact button:hover::after, .nav button:hover::after { transform: translateY(0); }
.gbtn:active, .wact button:active, .nav button:active { transform: scale(.97); }
.seg .thumb { --tint: var(--blue); }
.seg button { font-family: var(--sans2); }
/* the Adjust popover: rounded white glass */
.pop { border-radius: 18px; background: rgba(255,255,255,.96); box-shadow: 0 18px 40px rgba(18,28,38,.18), inset 0 0 0 1px rgba(var(--blue), .1); }
.pop select, .pop .born input, .firstbirth select, .firstbirth input { border-radius: 10px; font-family: var(--sans2); }
.preview input, .adj input[type=range], .pop .ctl input { accent-color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .gbtn::after, .wact button::after, .nav button::after { transition: none; } }
/* the calendar header is plain: no drawing, no tint, just the month, the switch and the close */
.cal .head .illus { display: none; }
.cal .head { background: transparent; box-shadow: none; }
.cal .head::after { display: none; }
/* the calendar card has sharp corners again */
.cal { border-radius: 0; }

/* ---- round 14: colour in the calendar, the Home way: a soft baby-blue card, white day tiles, lemon for today ---- */
.cal { background: #e4f0ff; box-shadow: 0 30px 70px rgba(18,28,38,.3), 0 2px 6px rgba(18,28,38,.1), inset 0 0 0 1px rgba(255,255,255,.7); }
.day { background: rgba(255,255,255,.88); border: 1px solid rgba(255,255,255,.95); box-shadow: 0 2px 8px rgba(var(--blue), .08); }
.day:hover { background: #fff; border-color: rgba(var(--blue), .3); }
.day.out { background: transparent; border-color: transparent; box-shadow: none; }
.day.out .n { color: rgba(38,52,61,.28); }
.day.today { background: rgba(var(--lemon), .55); border: 1.5px solid rgba(222,200,30,.9); box-shadow: 0 4px 14px rgba(var(--lemon), .45); }
.day.today .n { color: var(--ink); font-weight: 800; }
.day.today .slot, .day:hover .slot { color: #9a8400; }
.day.today:hover { background: rgba(var(--lemon), .7); }
/* weeks: lived in cornflower, ahead in white, this week lemon */
.w { background: rgba(255,255,255,.9); }
.w.lived { background: rgba(var(--blue), .55); }
.legend .a { background: rgba(var(--blue), .55); } .legend .c { background: #fff; outline: 1px solid rgba(var(--blue), .25); }
.stats span { color: rgba(38,52,61,.7); }
.pop { background: #fff; }

/* ---- round 15: softer, prettier pastels in the calendar ---- */
.cal { background: #eaf4ff; }
.day { border-radius: 12px; background: rgba(255,255,255,.92); border: 1px solid #fff; box-shadow: 0 3px 10px rgba(120,170,230,.12); }
.day:hover { background: #fff; border-color: #c9defa; box-shadow: 0 6px 16px rgba(120,170,230,.2); }
.day .slot { color: #a9c6ee; }
.day.today { border-radius: 12px; background: #fff3a6; border: 1.5px solid #f4e27c; box-shadow: 0 6px 18px rgba(250,226,90,.45); }
.day.today .n { color: #5a4c00; }
.day.today .slot, .day.today:hover .slot { color: #c2a812; }
.day.today:hover { background: #fff0c0; }
.dow span { color: #7fa6d9; }
.cal .title .cap { color: #7fa6d9; }
/* weeks: lived in pastel periwinkle, ahead in white, this week a soft lemon glow */
.w.lived { background: #b8d2f6; }
.w.now { background: #ffec7a; box-shadow: 0 0 10px 3px rgba(255,232,110,.85); }
.legend .a { background: #b8d2f6; } .legend .b { background: #ffec7a; }
