/* Couch Couture's shared parts (couture.js sets html[data-couture] and the --cc-* colours): the one colour map, the
   scenery behind the page, the animated couch and the slipcover menu. Each page's own skin is beside it (shelf.css,
   lobby.css, pad.css): only the shapes of its own parts. */
@import url('https://fonts.googleapis.com/css2?family=Luckiest+Guy&family=Fredoka:wght@500;600;700&display=swap');
:root { --cc-ink: #1B1530; --cc-paper: #FFFDF5; --cc-paper2: #F3ECDC; --cc-muted: #5B5470; --cc-shadow: 5px 5px 0 var(--cc-ink);
        --cc-bg: #63C5FF; --cc-bg2: #A6E1FF; --cc-text: #1B1530; --cc-a: #FF5A4E; --cc-a2: #FFD23F; --cc-a3: #44C767;
        --cc-a-ink: #fff; --cc-a2-ink: #1B1530; --cc-a3-ink: #1B1530; }
/* ---- the one colour map: the Twilight Cabin's colours (cabin.css: every page's names for them) in the slipcover's.
   Paper boxes with ink outlines; Play in the slipcover's first colour, the lamp in its second, cedar in its third */
html[data-couture] {
  --wall: var(--cc-paper2); --wall2: #E8DFCB; --card: var(--cc-paper); --edge: var(--cc-ink); --off: #D9D0BE;
  --ink: var(--cc-ink); --soft: var(--cc-muted);
  --play: var(--cc-a); --play-hi: var(--cc-a); --play-ink: var(--cc-a-ink); --play-low: var(--cc-ink); --teal: var(--cc-ink);
  --sage: #1E7A4E; --sage-low: var(--cc-ink);
  --cedar: var(--cc-a3); --cedar-hi: var(--cc-a3); --cedar-low: var(--cc-ink); --cedar-line: var(--cc-ink); --tag: var(--cc-a3-ink);
  --lamp: var(--cc-a2); --lamp-hi: var(--cc-a2); --lamp-low: var(--cc-ink); --plum: #7A4CFF;
  color-scheme: light;
}
html[data-couture] { background: var(--cc-bg); transition: background-color .5s; }
html[data-couture] body { background: transparent; }

/* ---- the scenery: fixed behind everything (z-index -1 under the page's own boxes) */
#ccSky { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
         background: radial-gradient(circle at 50% 120%, var(--cc-bg2) 0 40%, transparent 41%), var(--cc-bg); }
html:not([data-couture]) #ccSky { display: none; }
#ccSky .p { position: absolute; }
/* a cloud is one SVG (couture.js CLOUD): its three shapes drawn twice, a thick ink copy under a white one, so the outline
   goes round the whole cloud with no seams where the shapes meet (2026-11-09) */
#ccSky .cloud { width: 200px; height: 116px; animation: cc-drift linear infinite; }
#ccSky .cloud svg { display: block; width: 100%; height: 100%; overflow: visible; }
#ccSky .cloud .ol { fill: var(--cc-ink); stroke: var(--cc-ink); stroke-width: 10; stroke-linejoin: round; }
#ccSky .cloud .fi { fill: #fff; }
@keyframes cc-drift { from { transform: translateX(-260px); } to { transform: translateX(calc(100vw + 260px)); } }
#ccSky .sun { width: 120px; height: 120px; border-radius: 50%; background: #FFD23F; border: 6px solid var(--cc-ink); right: 6vw; top: 90px; box-shadow: 0 0 0 18px #ffffff44; }
#ccSky .moon { width: 110px; height: 110px; border-radius: 50%; background: #FFF1B8; border: 6px solid var(--cc-ink); right: 7vw; top: 90px; box-shadow: inset -22px -10px 0 #E8D48A; }
#ccSky .star { width: 10px; height: 10px; background: #FFF1B8; border-radius: 2px; transform: rotate(45deg); animation: cc-twinkle 2.4s ease-in-out infinite; }
@keyframes cc-twinkle { 50% { opacity: .2; } }
#ccSky .flake { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid #b9d9f5; animation: cc-fall linear infinite; }
@keyframes cc-fall { from { transform: translateY(-40px); } to { transform: translateY(110vh); } }
#ccSky .confetto { width: 12px; height: 18px; border: 2px solid var(--cc-ink); animation: cc-fall linear infinite; }
#ccSky .heart { font-size: 34px; animation: cc-rise linear infinite; color: #E2363F; -webkit-text-stroke: 2px var(--cc-ink); }
@keyframes cc-rise { from { transform: translateY(110vh) rotate(-10deg); } to { transform: translateY(-60px) rotate(10deg); } }
#ccSky .rainbow { width: 520px; height: 260px; left: -120px; bottom: -60px; border-radius: 520px 520px 0 0;
                  background: radial-gradient(circle at 50% 100%, transparent 0 46%, var(--cc-ink) 46% 47.5%, #8B5CF6 47.5% 55%, #3B82F6 55% 62%, #44C767 62% 69%, #FFD23F 69% 76%, #FF8A1F 76% 83%, #FF5A4E 83% 90%, var(--cc-ink) 90% 91.5%, transparent 91.5%); }
#ccSky .bat { width: 70px; animation: cc-flap 3.2s ease-in-out infinite; }
@keyframes cc-flap { 0%, 100% { transform: translate(0, 0) scaleY(1); } 25% { transform: translate(40px, -20px) scaleY(.6); } 50% { transform: translate(90px, 0) scaleY(1); } 75% { transform: translate(40px, 20px) scaleY(.6); } }
#ccSky .sea { left: 0; right: 0; bottom: 0; height: 22vh; background: repeating-linear-gradient(90deg, #1D5C78 0 60px, #22698A 60px 120px); border-top: 6px solid var(--cc-ink); }
#ccSky .wave { bottom: 22vh; width: 120px; height: 34px; border: 6px solid var(--cc-ink); border-bottom: 0; border-radius: 60px 60px 0 0; background: #2C7DA0; animation: cc-bob 3s ease-in-out infinite; }
#ccSky .sand { left: 0; right: 0; bottom: 0; height: 18vh; background: #F7D88A; border-top: 6px solid var(--cc-ink); }
#ccSky .ocean { left: 0; right: 0; bottom: 18vh; height: 12vh; background: #2EC4B6; border-top: 6px solid var(--cc-ink); }
#ccSky .grid { left: -20%; right: -20%; bottom: 0; height: 40vh; background:
                 repeating-linear-gradient(90deg, #3EF3FF 0 3px, transparent 3px 80px), repeating-linear-gradient(0deg, #3EF3FF 0 3px, transparent 3px 50px), #2A0D45;
               transform: perspective(300px) rotateX(60deg); transform-origin: bottom; }
#ccSky .sunset { width: 260px; height: 260px; left: calc(50% - 130px); bottom: 26vh; border-radius: 50%; border: 6px solid var(--cc-ink);
                 background: repeating-linear-gradient(180deg, #FFE14D 0 22px, #FF3EA5 22px 30px); }
#ccSky .curtain { top: 0; bottom: 0; width: 13vw; background: repeating-linear-gradient(90deg, #A3123D 0 26px, #7A0A2C 26px 52px); border: 6px solid var(--cc-ink); }
#ccSky .curtain.l { left: 0; border-left: 0; border-radius: 0 0 60% 0; } #ccSky .curtain.r { right: 0; border-right: 0; border-radius: 0 0 0 60%; }
#ccSky .spot { top: -10vh; width: 30vw; height: 120vh; background: linear-gradient(#FFF4D622, #FFF4D600); clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%); animation: cc-sweep 6s ease-in-out infinite alternate; transform-origin: top; }
@keyframes cc-sweep { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
#ccSky .paw { font-size: 28px; opacity: .35; }
#ccSky .pine { bottom: 0; width: 0; height: 0; border-left: 60px solid transparent; border-right: 60px solid transparent; border-bottom: 200px solid #1C3A2A; filter: drop-shadow(0 -4px 0 var(--cc-ink)); }
#ccSky .stripes { left: 0; right: 0; bottom: 0; top: 30vh; background: repeating-linear-gradient(90deg, #2E8B3E 0 90px, #3FA650 90px 180px); border-top: 6px solid #fff; }
#ccSky .lightpole { top: 4vh; width: 90px; height: 50px; background: #FFF4C2; border: 5px solid var(--cc-ink); border-radius: 10px; box-shadow: 0 0 60px #FFF4C2; }
#ccSky .planet { border-radius: 50%; border: 6px solid var(--cc-ink); }
@keyframes cc-bob { 50% { transform: translateY(-6px); } }

/* ---- the couch: it breathes, its cushions bob, it hops when pointed at (no face: Zach 2026-10-29) */
.cc-couch { overflow: visible; display: block; width: 100%; height: auto; }
.cc-couch .body { transform-origin: 50% 100%; animation: cc-breathe 2.6s ease-in-out infinite; }
.cc-couch .cl { animation: cc-cushion 1.3s ease-in-out infinite; transform-origin: 50% 100%; }
.cc-couch .cr { animation: cc-cushion 1.3s ease-in-out infinite .65s; transform-origin: 50% 100%; }
[data-couture-couch]:hover .cc-couch .body { animation: cc-hop .6s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes cc-breathe { 50% { transform: scale(1.015, .985); } }
@keyframes cc-cushion { 50% { transform: scaleY(.94); } }
@keyframes cc-hop { 40% { transform: translateY(-14px) scale(.96, 1.06); } 70% { transform: translateY(0) scale(1.06, .94); } }
.cc-couch .blinky { animation: cc-twinkle 1.1s steps(2) infinite; }
.cc-couch .blinky:nth-child(2n) { animation-delay: .55s; }
.cc-couch .bobber { animation: cc-float 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.cc-couch .bobber:nth-of-type(2n) { animation-delay: .8s; }
@keyframes cc-float { 50% { transform: translateY(-10px) rotate(4deg); } }
.cc-couch .riser { animation: cc-coin 2.2s ease-in infinite; transform-box: fill-box; }
.cc-couch .riser:nth-of-type(2n) { animation-delay: 1.1s; }
@keyframes cc-coin { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-60px); opacity: 0; } }
.cc-couch .flicker { animation: cc-flick .25s steps(2) infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes cc-flick { 50% { transform: scaleY(1.15) scaleX(.92); } }
.cc-couch .wag { animation: cc-wag 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 0% 100%; }
@keyframes cc-wag { 50% { transform: rotate(14deg); } }
.cc-couch .flapbat { animation: cc-batfly 4s ease-in-out infinite; transform-box: fill-box; }
@keyframes cc-batfly { 50% { transform: translate(-30px, -10px) scaleX(-1); } }
[data-couture-couch] { cursor: context-menu; }

/* ---- the slipcover menu (opened by a right-click or long-press on the couch; closed by a click outside or Esc) */
.cc-menu { position: fixed; z-index: 1000; width: min(760px, 96vw); max-height: 92vh; overflow: auto; padding: 16px; display: none;
           background: var(--cc-paper); color: var(--cc-ink); border: 5px solid var(--cc-ink); border-radius: 26px; box-shadow: var(--cc-shadow);
           font: 600 16px/1.35 Fredoka, system-ui, sans-serif; text-align: left; }
.cc-menu.open { display: block; animation: cc-pop .25s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes cc-pop { from { transform: scale(.7); opacity: 0; } }
.cc-menu h2 { margin: 0 0 2px; font: 400 30px/1.1 'Luckiest Guy', Fredoka, sans-serif; letter-spacing: .02em; color: var(--cc-ink); }
.cc-menu p { margin: 0 0 12px; color: var(--cc-muted); font-size: 14px; }
.cc-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.cc-swatch { border: 4px solid var(--cc-ink); border-radius: 18px; padding: 6px 8px 8px; background: #fff; cursor: pointer; text-align: center; box-shadow: 3px 3px 0 var(--cc-ink);
             transition: transform .15s; font: 600 13px Fredoka, sans-serif; color: var(--cc-ink); }
.cc-swatch:hover, .cc-swatch:focus-visible { transform: translateY(-3px) rotate(-1.5deg); outline: none; }
.cc-swatch[aria-pressed="true"] { outline: 5px solid var(--cc-a2); outline-offset: 0; background: #FFF6D6; }
.cc-swatch .cc-couch { height: 76px; }
.cc-swatch b { display: block; font: 400 15px/1.1 'Luckiest Guy', sans-serif; letter-spacing: .02em; margin: 2px 0; }
.cc-swatch small { font-size: 12px; color: var(--cc-muted); }
.cc-season { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 15px; color: var(--cc-ink); cursor: pointer; }
.cc-season input { width: 20px; height: 20px; accent-color: var(--cc-a); }

/* ---- the lever (the Easter egg): a little recliner lever, no label; pull it (click, tap, Enter or drag it down) */
.cc-lever { --pull: 0; display: inline-block; width: 28px; height: 46px; padding: 0; margin: 0; border: 0; background: none; cursor: grab; vertical-align: bottom;
            touch-action: none; -webkit-tap-highlight-color: transparent; }
.cc-lever:active { cursor: grabbing; }
.cc-lever svg { display: block; width: 100%; height: 100%; overflow: visible; }
.cc-lever .cc-stick { transform-box: view-box; transform-origin: 20px 54px; transform: rotate(calc(var(--pull) * 62deg)); transition: transform .35s cubic-bezier(.3, 1.8, .5, 1); }
.cc-lever:hover .cc-stick { transform: rotate(calc(8deg + var(--pull) * 54deg)); }
.cc-lever.pulled .cc-stick { transition-duration: .12s; }
.cc-lever:focus-visible { outline: 3px solid var(--cc-a2); outline-offset: 2px; border-radius: 8px; }
html:not([data-couture]) .cc-lever { display: none; }

/* ---- the slipcover wheel */
.cc-wheel { position: fixed; inset: 0; z-index: 1001; display: none; place-items: center; align-content: center; gap: 18px; background: #1B1530b3; }
.cc-wheel.open { display: grid; animation: cc-pop .3s cubic-bezier(.3, 1.8, .5, 1); }
.cc-wbox { position: relative; width: min(78vmin, 520px); aspect-ratio: 1; }
.cc-rim { position: absolute; inset: 0; border-radius: 50%; background: var(--cc-paper); border: 6px solid var(--cc-ink); box-shadow: 8px 8px 0 var(--cc-ink); padding: 8px; }
.cc-disc { display: block; width: 100%; height: 100%; will-change: transform; }
.cc-disc * { animation: none !important; }
.cc-hub { position: absolute; left: 50%; top: 50%; width: 15%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
          background: var(--cc-a2); border: 5px solid var(--cc-ink); box-shadow: inset -4px -4px 0 #0002; }
.cc-pointer { position: absolute; left: 50%; top: -4%; width: 11%; aspect-ratio: .8; transform: translateX(-50%); transform-origin: 50% 20%;
              background: var(--cc-a); clip-path: polygon(0 0, 100% 0, 50% 100%); filter: drop-shadow(0 0 0 var(--cc-ink)); }
.cc-pointer::before { content: ''; position: absolute; inset: -5px; z-index: -1; background: var(--cc-ink); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.cc-pointer.flick { animation: cc-flick2 .12s ease-out; }
@keyframes cc-flick2 { 40% { transform: translateX(-50%) rotate(-14deg); } }
.cc-won { min-height: 1.2em; font: 400 clamp(30px, 6vmin, 56px)/1.1 'Luckiest Guy', Fredoka, sans-serif; letter-spacing: .03em; text-align: center;
          color: var(--cc-paper); -webkit-text-stroke: 3px var(--cc-ink); paint-order: stroke fill; text-shadow: 5px 5px 0 var(--cc-ink); opacity: 0; transform: scale(.6); }
.cc-won.on { opacity: 1; transform: none; transition: transform .45s cubic-bezier(.3, 1.8, .5, 1), opacity .2s; }

@media (prefers-reduced-motion: reduce) {
  #ccSky *, .cc-couch *, .cc-menu.open, .cc-wheel.open, .cc-pointer.flick { animation: none !important; }
}
