/* eggs.css — the den's secrets (js/eggs.js). Prefix eg-, html.eg-*, vars --eg-*. */

/* ---- hotspots: decor that quietly becomes touchable ---- */
.eg-hot { pointer-events: auto; cursor: pointer; }
.eg-tap { cursor: pointer; }
.stockings .stocking.eg-hot { transition: filter .25s; }
@media (hover: hover) {
  .stockings .stocking.eg-hot:hover { filter: brightness(.86) drop-shadow(0 6px 5px rgba(0,0,0,.55)); }
  .hearth .firebox.eg-hot:hover { filter: brightness(1.08); }
}

/* ---- found badge ---- */
.eg-badge { position: fixed; z-index: 1200; left: 50%; top: calc(10px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -6px);
  padding: 5px 11px 4px; border-radius: 999px; background: rgba(20,13,9,.86); color: #ffe6a8; font: 600 12px/1 Archivo, sans-serif;
  letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 6px 18px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,214,140,.25);
  pointer-events: none; animation: eg-badge-in .35s cubic-bezier(.2,.9,.3,1.2) both; }
.eg-badge b { color: #ffcf4a; margin-right: 3px; }
.eg-badge.out { opacity: 0; transition: opacity .5s; }
@keyframes eg-badge-in { from { opacity: 0; transform: translate(-50%, -16px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---- the paper note (Mom's rewind note, gift tag) ---- */
.eg-note { position: fixed; z-index: 1100; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  width: min(300px, calc(100vw - 32px)); padding: 14px 16px 12px; color: #3a2a20; cursor: pointer;
  background: #f6d7d7 linear-gradient(180deg, rgba(255,255,255,.35), transparent 40%);
  box-shadow: 0 14px 30px rgba(0,0,0,.5), 0 2px 3px rgba(0,0,0,.25);
  transform: translateY(30px) rotate(3deg); opacity: 0; transition: transform .45s cubic-bezier(.2,.9,.3,1.15), opacity .25s; }
.eg-note.in { transform: translateY(0) rotate(-2deg); opacity: 1; }
.eg-note.out { transform: translateY(20px) rotate(4deg); opacity: 0; transition-duration: .35s; }
.eg-slip::before { content: ''; position: absolute; left: 0; right: 0; top: -5px; height: 6px;
  background: radial-gradient(circle 3px at 6px 6px, transparent 2.5px, #f6d7d7 3px) 0 0 / 12px 6px repeat-x; }
.eg-slip-head { display: flex; align-items: baseline; gap: 8px; border-bottom: 2px solid #b8282e; padding-bottom: 4px; }
.eg-slip-head b { font: 400 22px/1 'Archivo Black', sans-serif; color: #b8282e; letter-spacing: .02em; }
.eg-slip-head span { font: 700 10px/1 Archivo, sans-serif; color: #b8282e; letter-spacing: .14em; }
.eg-slip-sub { font: 600 9px/1.6 Archivo, sans-serif; letter-spacing: .16em; color: #7a5a4a; margin: 4px 0 6px; }
.eg-note dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0; font: 400 13px/1.3 Archivo, sans-serif; }
.eg-note dt { font: 600 9px/1.6 Archivo, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #8a6a5a; }
.eg-note dd { margin: 0; font-family: 'Permanent Marker', cursive; color: #1d2a6a; font-size: 14px; }
.eg-note dd.mono { font-family: 'Share Tech Mono', monospace; color: #3a2a20; }
.eg-note dd small { font-family: Archivo, sans-serif; font-size: 10px; color: #8a6a5a; }
.eg-sig, .eg-hand { margin: 8px 0 0; font: 400 15px/1.25 'Permanent Marker', cursive; color: #1d2a6a; transform: rotate(-2deg); }
.eg-stamp { position: absolute; right: 14px; bottom: 40px; padding: 4px 8px; font: 400 15px/1 'Archivo Black', sans-serif; font-style: normal;
  color: rgba(200,20,30,.82); border: 3px double rgba(200,20,30,.8); border-radius: 4px; transform: rotate(-14deg) scale(1.6); opacity: 0;
  text-align: center; letter-spacing: .04em; mix-blend-mode: multiply; animation: eg-stamp .22s .5s cubic-bezier(.3,1.4,.5,1) forwards; }
@keyframes eg-stamp { to { transform: rotate(-14deg) scale(1); opacity: 1; } }
.eg-tag { right: max(16px, calc(50vw - 100px)); background: #fff6dc; width: min(200px, calc(100vw - 32px)); text-align: center; }
.eg-tag::before { content: ''; position: absolute; left: 50%; top: 8px; width: 9px; height: 9px; margin-left: -4px; border-radius: 50%; box-shadow: inset 0 0 0 2px #b8282e; }
.eg-tag .eg-hand { margin-top: 12px; }

/* ---- TV listings ---- */
.eg-guide { position: fixed; inset: 0; z-index: 1150; display: grid; place-items: center; padding: 16px;
  background: rgba(8,5,3,.62); opacity: 0; transition: opacity .25s; }
.eg-guide.in { opacity: 1; }
.eg-guide-page { position: relative; width: min(440px, 100%); max-height: min(86dvh, 720px); overflow: auto; overscroll-behavior: contain;
  background: #efe8d4 linear-gradient(90deg, rgba(0,0,0,.06), transparent 8%, transparent 92%, rgba(0,0,0,.08));
  color: #221c14; padding: 14px 16px 12px; border-radius: 2px; box-shadow: 0 30px 60px rgba(0,0,0,.6);
  transform: translateY(24px) rotate(-1.5deg) scale(.96); transition: transform .4s cubic-bezier(.2,.9,.3,1.1); }
.eg-guide.in .eg-guide-page { transform: none; }
.eg-guide header { padding-right: 34px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 10px; border-bottom: 3px solid #221c14; padding-bottom: 6px; margin-bottom: 4px; }
.eg-guide header b { grid-row: span 2; background: #d61f26; color: #fff; font: 400 20px/1 'Archivo Black', sans-serif; padding: 6px 8px 5px; letter-spacing: .02em; }
.eg-guide header span { font: 800 14px/1 Archivo, sans-serif; letter-spacing: .06em; }
.eg-guide header small { font: 600 9px/1 Archivo, sans-serif; letter-spacing: .18em; color: #6a5e4a; }
.eg-guide ul { list-style: none; margin: 0; padding: 0; }
.eg-guide li { display: grid; grid-template-columns: 38px 24px 1fr; gap: 8px; padding: 7px 0; border-bottom: 1px dotted #9a8e74; font: 400 12.5px/1.35 Archivo, sans-serif; }
.eg-guide time { font: 800 12px/1.4 Archivo, sans-serif; }
.eg-guide li > i { font: 800 11px/1 Archivo, sans-serif; font-style: normal; display: grid; place-items: center; height: 18px; border: 1.5px solid #221c14; border-radius: 3px; }
.eg-guide li b { font: 800 12px/1.35 Archivo, sans-serif; letter-spacing: .02em; }
.eg-guide li em { font-weight: 800; font-style: italic; }
.eg-guide .eg-us { background: rgba(214,31,38,.08); margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
.eg-guide .eg-us > i { background: #221c14; color: #efe8d4; }
.eg-shelf { display: inline-block; margin-top: 4px; padding: 3px 7px 2px; border: 0; border-radius: 2px; background: #221c14; color: #ffd36a;
  font: 700 10px/1.2 Archivo, sans-serif; letter-spacing: .1em; cursor: pointer; }
.eg-shelf:hover, .eg-shelf:focus-visible { background: #d61f26; color: #fff; outline: none; }
.eg-guide footer { margin-top: 8px; font: 600 9px/1.4 Archivo, sans-serif; letter-spacing: .1em; color: #6a5e4a; text-transform: uppercase; }
.eg-x { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: #221c14;
  font: 400 24px/1 Archivo, sans-serif; cursor: pointer; }
.eg-x:hover, .eg-x:focus-visible { background: rgba(0,0,0,.08); outline: none; }

/* ---- snow day ---- */
.eg-snow { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1050; pointer-events: none; }
html.eg-snowday .room-light { filter: saturate(.85) brightness(1.04); }

/* ---- hearth ---- */
.eg-sparks { position: fixed; pointer-events: none; z-index: 3; mix-blend-mode: screen; }
.eg-sparks i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff4c4; box-shadow: 0 0 6px 2px rgba(255,170,60,.95), 0 0 14px 4px rgba(255,110,30,.55); }
.eg-sparks i.sm { width: 2.5px; height: 2.5px; }
.eg-sparks .eg-flare { left: -10%; right: -10%; bottom: 0; top: auto; width: auto; height: 85%; border-radius: 50% 50% 0 0;
  background: radial-gradient(ellipse at 50% 90%, rgba(255,214,120,.95), rgba(255,120,30,.55) 40%, rgba(255,80,20,.15) 62%, transparent 75%); box-shadow: none; mix-blend-mode: screen;
  animation: eg-flare 1.4s ease-out forwards; }
@keyframes eg-flare { 0% { opacity: 0; transform: scaleY(.6); } 15% { opacity: 1; transform: scaleY(1.1); } 100% { opacity: 0; transform: scaleY(1); } }
.eg-cane { position: fixed; z-index: 60; width: 20px; height: 44px; pointer-events: none; filter: drop-shadow(0 3px 3px rgba(0,0,0,.5)); }
.eg-cane svg { width: 100%; height: 100%; display: block; }
.eg-cane.out { opacity: 0; transition: opacity .5s; }

/* ---- sleigh + window fog ---- */
.eg-sleigh { position: absolute; left: 0; top: 4%; width: 78%; pointer-events: none; z-index: 1; }
.eg-sleigh svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 0 1.5px rgba(160,190,255,.55)); }
.eg-nose { filter: drop-shadow(0 0 2px #ff3b2e) drop-shadow(0 0 4px #ff3b2e); animation: eg-nose .6s ease-in-out infinite alternate; }
@keyframes eg-nose { from { opacity: .7; } to { opacity: 1; } }
.eg-fog { position: absolute; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; pointer-events: none; z-index: 5;
  background: radial-gradient(circle, rgba(225,235,255,.42), rgba(225,235,255,.18) 50%, transparent 70%); animation: eg-fog 2.6s ease-out forwards; }
@keyframes eg-fog { 0% { opacity: 0; transform: scale(.4); } 12% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.15); } }

/* ---- the cat ---- */
.eg-cat.eg-cat-sm { width: 56px; pointer-events: none; }
.eg-cat.eg-cat-sm .eg-cat-body { pointer-events: visiblePainted; }
.eg-cat { position: fixed; z-index: 55; left: 0; bottom: calc(var(--table-h, 0px) - 4px); width: clamp(84px, 8.5vw, 128px); height: auto; padding: 0;
  border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; transform: translateX(-200px);
  filter: drop-shadow(0 4px 4px rgba(0,0,0,.5)) drop-shadow(0 0 6px var(--tree-light, rgba(255,180,107,.35))); }
.eg-cat svg { display: block; width: 100%; height: auto; overflow: visible; transition: transform .25s; }
.eg-cat.rtl svg { transform: scaleX(-1); }
.eg-cat .eg-head { transform-origin: 88px 34px; transition: transform .4s; }
.eg-cat .eg-tail { transform-origin: 24px 42px; animation: eg-tail 2.4s ease-in-out infinite alternate; }
.eg-cat .eg-legs rect { transform-box: fill-box; transform-origin: 50% 0; }
.eg-cat .eg-eye { opacity: 0; transition: opacity .3s; }
.eg-cat.walking .eg-legs .l1, .eg-cat.walking .eg-legs .l4 { animation: eg-step .5s ease-in-out infinite alternate; }
.eg-cat.walking .eg-legs .l2, .eg-cat.walking .eg-legs .l3 { animation: eg-step .5s ease-in-out infinite alternate-reverse; }
.eg-cat.walking .eg-cat-body { animation: eg-bob .25s ease-in-out infinite alternate; }
.eg-cat.sit .eg-head { transform: rotate(-6deg) translate(-2px, 2px); }
.eg-cat.sit .eg-eye { opacity: 1; }
.eg-cat.sit .eg-tail { animation-duration: 1.2s; }
.eg-cat.pet .eg-head { transform: rotate(10deg) translate(0, 3px); }
.eg-cat.pet .eg-eye { opacity: .2; }
.eg-cat.out { opacity: 0; transition: opacity .45s; }
.eg-cat.fadein { animation: eg-fade .6s ease both; }
.eg-cat:focus-visible { outline: 2px dashed #ffd36a; outline-offset: 4px; }
.eg-heart { position: absolute; left: 70%; top: -6px; color: #ff6a8a; font-style: normal; font-size: 18px; pointer-events: none;
  text-shadow: 0 0 6px rgba(255,80,120,.6); animation: eg-heart 1.2s ease-out forwards; }
@keyframes eg-step { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
@keyframes eg-bob { from { transform: translateY(0); } to { transform: translateY(-1.5px); } }
@keyframes eg-tail { from { transform: rotate(-8deg); } to { transform: rotate(10deg); } }
@keyframes eg-heart { from { opacity: 1; transform: translateY(0) scale(.8); } to { opacity: 0; transform: translateY(-34px) scale(1.2); } }
@keyframes eg-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---- the VCR screensaver on the blue screen ---- */
.screen > .eg-saver { z-index: 3; pointer-events: none; overflow: hidden; border-radius: inherit; opacity: 0; transition: opacity .6s; }
.screen > .eg-saver.in { opacity: 1; }
.eg-saver b { position: absolute; left: 0; top: 0; padding: .8cqw 2cqw; font: 400 7cqw/1 'Russo One', sans-serif; letter-spacing: .06em;
  border: .5cqw solid currentColor; border-radius: 1.2cqw; text-shadow: 0 0 1.4cqw currentColor; will-change: transform; transition: color .2s; }
.eg-saver i { position: absolute; left: 0; right: 0; top: 44%; text-align: center; font: 400 8cqw/1 VT323, monospace; font-style: normal; color: #fff;
  text-shadow: 0 0 1cqw #fff; opacity: 0; }
.eg-saver.hit i { animation: eg-corner 2.4s ease-out; }
.eg-saver.hit b { animation: eg-flash .5s steps(2) 3; }
@keyframes eg-corner { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
@keyframes eg-flash { 50% { filter: brightness(2.2); } }

@media (prefers-reduced-motion: reduce) {
  .eg-note, .eg-guide-page, .eg-badge { transition: opacity .15s !important; animation: none !important; transform: none !important; }
  .eg-cat *, .eg-nose, .eg-fog, .eg-saver b { animation: none !important; }
  .eg-stamp { animation: none !important; opacity: 1; transform: rotate(-14deg); }
  .eg-saver.hit i { animation: none !important; opacity: 1; }
}

/* integration: on phones the slip would land on the held box's open bottom (where the tape is pulled out),
   so it sits over the TV instead: top in portrait, top-left in landscape. */
@media (max-width: 820px) {
  .eg-note { top: calc(64px + env(safe-area-inset-top, 0px)); bottom: auto; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .eg-note { top: calc(10px + env(safe-area-inset-top, 0px)); bottom: auto; right: auto;
    left: max(16px, env(safe-area-inset-left, 0px)); width: min(290px, 44vw); }
}

/* ---- the "please rewind" sticky note from Mom (home, not a rental store) ---- */
.eg-note.eg-sticky { width: min(240px, 72vw); padding: 18px 16px 12px; background: linear-gradient(180deg, #fff27a, #f7e35a); color: #2a2418;
  box-shadow: 0 10px 18px rgba(0,0,0,.35), inset 0 -6px 10px rgba(0,0,0,.05); border-radius: 1px; }
.eg-note.eg-sticky.in { transform: translateY(0) rotate(-3deg); }
.eg-sticky-text { margin: 0 0 8px; font: 400 17px/1.3 'Permanent Marker', 'Comic Sans MS', cursive; }
.eg-sticky .eg-sig { margin: 0; text-align: right; font: 400 15px/1 'Permanent Marker', cursive; }
/* TV Guide 'ON OUR SHELF': the named spine leans out and glows */
.spine.eg-spot { z-index: 5; filter: brightness(1.25) saturate(1.1) !important; box-shadow: 0 0 0 2px #ffd56a, 0 0 18px 4px rgba(255,200,90,.75) !important; transition: box-shadow .3s, filter .3s; }

/* Dad's note about the end of Bella's recital: his marker, a slightly crooked other-way tilt, and on a phone held
   upright it goes on the shelves panel (the TV may still be showing what he taped over the end) */
.eg-note.eg-sticky.eg-dad.in { transform: translateY(0) rotate(2.5deg); }
.eg-note.eg-sticky.eg-dad .eg-sticky-text { font-size: 16px; }
@media (max-width: 820px) and (orientation: portrait), (max-width: 820px) and (min-height: 501px) {
  .eg-note.eg-sticky.eg-dad { top: calc(var(--av-h, 340px) + 54px); right: calc(16px + var(--sar, 0px)); }   /* under the "found" badge */
}
