/* =====================================================================
   kitchen.css — the look of sky/kitchen.js.
   (it used to be written inside the script, as strings; same rules, now here)
   ===================================================================== */

/* the arrow on the hallway's left: this way to the kitchen (flipped: the arrow's drawn pointing right) */
.hallway .room-arrow.hall-to-kitchen>svg,
.hallway .room-arrow.hall-to-kitchen>.art {
    transform: scaleX(-1);
}
.hallway .room-arrow.hall-to-kitchen:hover,
.hallway .room-arrow.hall-to-kitchen:focus-visible {
    transform: translateX(-4px);
}
.room-arrow .ra-hint {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s;
    font: italic .95rem "IM Fell English", Georgia, serif;
    color: #f3e6c2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
}
.room-arrow .ra-hint {
    left: calc(100% + 8px);
}
.room-arrow.back-right .ra-hint {
    left: auto;
    right: calc(100% + 8px);
}
.room-arrow:hover .ra-hint,
.room-arrow:focus-visible .ra-hint {
    opacity: 1;
}
.kitchen .kh-hint {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 6px);
    transform: translateX(-50%);
    white-space: nowrap;
    font: italic .95rem "IM Fell English", Georgia, serif;
    color: #f3e6c2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
    opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
    z-index: 6;
}
.kitchen .kitchen-serpent:hover .kh-hint {
    opacity: 1;
}
.kitchen .kitchen-serpent .kh-hint {
    color: #c8e0a0;
}
/* the kitchen: over the hallway, sliding in from the left */
.kitchen {
    position: fixed;
    inset: 0;
    z-index: 3;
    overflow: hidden;
    transform: translateX(-100%);
    visibility: hidden;
    --floor-h: 12vh;
    background: #b8a98a;
}
.kitchen>.art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.kitchen>.kitchen-wall {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
.kitchen:has(> .art)>.kitchen-wall {
    display: none;
}
body.in-kitchen .kitchen,
body.kitchen-panning .kitchen {
    visibility: visible;
    transition: transform .9s cubic-bezier(.55, 0, .25, 1), visibility 0s;
}
body.in-kitchen .kitchen {
    transform: none;
}
body.in-kitchen .hallway {
    translate: 100% 0;
}
body.in-hall .hallway {
    transition: transform .9s cubic-bezier(.55, 0, .25, 1), translate .9s cubic-bezier(.55, 0, .25, 1), visibility 0s;
}
body.kitchen-now .kitchen,
body.kitchen-now .hallway {
    transition: none !important;
}
.kitchen .furnish {
    position: absolute;
    z-index: 2;
}
.kitchen .room-floor {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--floor-h);
    z-index: 1;
    pointer-events: none;
}
.kitchen .room-floor .placeholder,
.kitchen .room-floor>.art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: fill;
}
.kitchen .room-floor .placeholder {
    border-top: 6px solid #5a4a3a;
    background: repeating-conic-gradient(#e8e0cc 0 25%, #6a5a4a 0 50%) 0 0 / 64px 64px;
    box-shadow: inset 0 14px 20px rgba(0, 0, 0, .3);
}
.kitchen .kitchen-window {
    left: 38%;
    top: 12%;
    width: 17%;
    min-width: 120px;
}
.kitchen .kitchen-fridge {
    left: 3%;
    bottom: calc(var(--floor-h) - 1vh);
    height: 58vh;
    aspect-ratio: 120 / 300;
    z-index: 3;
}
.kitchen .kitchen-fridge>.kf-inside,
.kitchen .kitchen-fridge>.kf-door {
    position: absolute;
    inset: 0;
}
.kitchen .kf-inside>svg,
.kitchen .kf-inside>.art,
.kitchen .kf-door>svg,
.kitchen .kf-door>.art {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
}
.kitchen .kf-door {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    z-index: 2;
    transform-origin: 0 50%;
    transition: transform .55s cubic-bezier(.5, 0, .3, 1), filter .25s;
}
.kitchen .kf-door:hover,
.kitchen .kf-door:focus-visible {
    outline: none;
    filter: drop-shadow(0 0 8px rgba(255, 220, 150, .55));
}
.kitchen .kf-door:hover .kh-hint,
.kitchen .kf-door:focus-visible .kh-hint {
    opacity: 1;
}
.kitchen .kitchen-fridge.open .kf-door {
    transform: perspective(900px) rotateY(-78deg);
}
.kitchen .kitchen-fridge.open .kf-door .kh-hint {
    display: none;
}
.kitchen .kitchen-fridge:not(.open) .kf-inside,
.kitchen .kitchen-fridge:not(.open) .kitchen-pie {
    visibility: hidden;
}
.kitchen .kf-inside {
    cursor: pointer;
}
/* the pie, on the bottom shelf (and in reset 3 the key, stuck in it: its ring out, the rest of it in the pie) */
.kitchen .kitchen-pie {
    position: absolute;
    left: 16%;
    width: 68%;
    bottom: 21.6%;
    aspect-ratio: 100 / 44;
    z-index: 1;
    cursor: pointer;
}
.kitchen .kitchen-pie>svg,
.kitchen .kitchen-pie>.art {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: 50% 100%;
}
.kitchen .kitchen-pie:hover .kh-hint {
    opacity: 1;
}
.kitchen .kitchen-pie .reset-key {
    width: 34%;
    transform: translate(-50%, -50%) rotate(78deg);
    clip-path: inset(0 42% 0 0);
}
.kitchen .kitchen-pie .reset-key::after {
    left: 12%;
    top: 18%;
}
.kitchen .kitchen-counter {
    left: 22%;
    right: 30%;
    bottom: calc(var(--floor-h) - 1vh);
    height: 24vh;
}
.kitchen .kc-body {
    position: absolute;
    inset: 0;
}
.kitchen .kc-body>svg,
.kitchen .kc-body>.art {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
}
/* the drawers, in the strip under the worktop. open: the front comes out towards you, and you see into it */
.kitchen .kitchen-drawer {
    position: absolute;
    top: 10.2%;
    height: 25.4%;
    width: 22.6%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    z-index: 2;
}
.kitchen .kitchen-drawer.d1 {
    left: 2.3%;
}
.kitchen .kitchen-drawer.d2 {
    left: 26.1%;
}
.kitchen .kitchen-drawer.d3 {
    left: 49.9%;
}
.kitchen .kitchen-drawer.d4 {
    left: 73.7%;
}
.kitchen .kd-front {
    position: absolute;
    inset: 0;
    transition: transform .4s cubic-bezier(.4, 0, .3, 1);
    z-index: 2;
}
.kitchen .kd-front>svg,
.kitchen .kd-front>.art {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
}
.kitchen .kd-inside {
    position: absolute;
    left: -3%;
    right: -3%;
    top: -34%;
    height: 118%;
    z-index: 1;
    clip-path: inset(100% 0 0 0);
    transition: clip-path .4s cubic-bezier(.4, 0, .3, 1);
    pointer-events: none;
}
.kitchen .kd-inside>svg,
.kitchen .kd-inside>.art {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
}
.kitchen .kitchen-drawer.open {
    z-index: 5;
}
.kitchen .kitchen-drawer.open .kd-front {
    transform: translateY(78%) scale(1.08);
}
.kitchen .kitchen-drawer.open .kd-inside {
    clip-path: inset(0 0 0 0);
}
.kitchen .kitchen-drawer:hover .kd-front,
.kitchen .kitchen-drawer:focus-visible .kd-front {
    filter: drop-shadow(0 0 6px rgba(255, 220, 150, .6));
}
.kitchen .kitchen-drawer:focus-visible {
    outline: none;
}
.kitchen .kitchen-drawer:hover .kh-hint {
    opacity: 1;
}
.kitchen .kitchen-drawer.open .kh-hint {
    display: none;
}
.kitchen .kitchen-bowl {
    left: 44%;
    bottom: calc(var(--floor-h) - 1vh + 24vh * .93);
    width: 9vw;
    min-width: 80px;
    aspect-ratio: 120 / 60;
    z-index: 3;
}
.kitchen .kitchen-bowl>svg,
.kitchen .kitchen-bowl>.art {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: 50% 100%;
}
.kitchen .kitchen-serpent {
    left: calc(44% - 2.2vw);
    bottom: calc(var(--floor-h) - 1vh + 24vh * .93 - 1.2vh);
    width: 13.5vw;
    min-width: 120px;
    aspect-ratio: 160 / 90;
    z-index: 4;
    display: none;
}
.kitchen .kitchen-serpent>svg,
.kitchen .kitchen-serpent>.art {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: 50% 100%;
}
.kitchen .kitchen-serpent .ks-eye {
    animation: ks-glint 5s ease-in-out infinite;
}
@keyframes ks-glint {
    0%,
    86%,
    100% {
        fill: #f0d040;
    }
    90% {
        fill: #fff8c0;
    }
}
/* before reset 3: sausages where the serpent will be */
.kitchen .kitchen-sausages {
    left: calc(44% - 2.2vw);
    bottom: calc(var(--floor-h) - 1vh + 24vh * .93 - 1.2vh);
    width: 13.5vw;
    min-width: 120px;
    aspect-ratio: 160 / 90;
    z-index: 4;
    display: none;
}
.kitchen .kitchen-sausages>svg,
.kitchen .kitchen-sausages>.art {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: 50% 100%;
}
.kitchen .kitchen-sausages:hover .kh-hint {
    opacity: 1;
}
.kitchen.bowl-serpent .kitchen-serpent,
.kitchen.bowl-sausages .kitchen-sausages,
.kitchen.bowl-turning .kitchen-sausages,
.kitchen.bowl-turning .kitchen-serpent {
    display: block;
}
/* (reset 3 on, the first time in: the sausages writhe, and they're a serpent) */
.kitchen.bowl-turning .kitchen-serpent {
    opacity: 0;
}
.kitchen.bowl-turning.turn .kitchen-sausages {
    animation: ks-writhe 2.6s ease-in forwards;
}
.kitchen.bowl-turning.turn .kitchen-serpent {
    animation: ks-become 2.6s ease-in forwards;
}
@keyframes ks-writhe {
    0% {
        transform: none;
        filter: none;
    }
    20% {
        transform: skewX(4deg);
    }
    40% {
        transform: skewX(-5deg) scaleY(1.05);
        filter: hue-rotate(60deg);
    }
    70% {
        transform: skewX(3deg);
        opacity: .6;
        filter: hue-rotate(90deg) saturate(.6);
    }
    100% {
        opacity: 0;
        filter: hue-rotate(100deg);
    }
}
@keyframes ks-become {
    0%,
    35% {
        opacity: 0;
        transform: skewX(-4deg);
    }
    70% {
        opacity: .8;
        transform: skewX(3deg);
    }
    100% {
        opacity: 1;
        transform: none;
    }
}
.kitchen .kitchen-back {
    position: absolute;
    right: 14px;
    top: 74%;
    margin-top: -27px;
    border: 0;
    cursor: pointer;
}
.kitchen .kitchen-character {
    left: calc(var(--kitchen-enter) * 1%);
    bottom: 3vh;
    height: var(--traveller-h);
    z-index: 5;
}
/* ---------------- the stove, at the end of the counter ---------------- */
.kitchen .kitchen-stove {
    left: 70.4%;
    bottom: calc(var(--floor-h) - 1vh);
    height: 31vh;
    aspect-ratio: 110 / 150;
    z-index: 2;
}
.kitchen .kitchen-stove>.ks-body,
.kitchen .kitchen-stove>.ks-flames,
.kitchen .kitchen-stove>.ks-door {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.kitchen .ks-body>svg,
.kitchen .ks-body>.art,
.kitchen .ks-flames>svg,
.kitchen .ks-flames>.art,
.kitchen .ks-door>svg,
.kitchen .ks-door>.art {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
}
/* the flames: only while the hob's lit, flickering */
.kitchen .ks-flames {
    opacity: 0;
    transition: opacity .25s;
}
.kitchen .kitchen-stove.lit .ks-flames {
    opacity: 1;
}
.kitchen .kitchen-stove.lit .ks-flames .ks-flame {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: ks-flicker .18s ease-in-out infinite alternate;
}
.kitchen .kitchen-stove.lit .ks-flames .f2 { animation-delay: -.07s; }
.kitchen .kitchen-stove.lit .ks-flames .f3 { animation-delay: -.12s; animation-duration: .22s; }
.kitchen .kitchen-stove.lit .ks-flames .f4 { animation-delay: -.03s; animation-duration: .2s; }
@keyframes ks-flicker {
    from { transform: scaleY(.82); opacity: .85; }
    to { transform: scaleY(1.08); opacity: 1; }
}
.kitchen .kitchen-stove.lit .ks-body {
    filter: drop-shadow(0 -6px 10px rgba(110, 150, 255, .35));
}
/* the oven door: drops open from its bottom edge (85.3% of the way down the canvas) */
.kitchen .ks-door {
    transform-origin: 50% 85.3%;
    transition: transform .55s cubic-bezier(.4, 0, .3, 1.15);
}
.kitchen .kitchen-stove.oven-open .ks-door {
    transform: perspective(700px) rotateX(-78deg);
}
.kitchen .kitchen-stove.oven-open .ks-body {
    filter: drop-shadow(0 0 16px rgba(255, 150, 70, .35));
}
/* where to click: the hob (the top fifth) and the oven door */
.kitchen .ks-hob,
.kitchen .ks-oven {
    position: absolute;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    z-index: 3;
}
.kitchen .ks-hob {
    left: 0;
    right: 0;
    top: 0;
    height: 25%;
}
.kitchen .ks-oven {
    left: 7%;
    right: 7%;
    top: 26.6%;
    height: 58.7%;
}
.kitchen .ks-hob:hover .kh-hint,
.kitchen .ks-hob:focus-visible .kh-hint,
.kitchen .ks-oven:hover .kh-hint,
.kitchen .ks-oven:focus-visible .kh-hint,
.kitchen .km-hit:hover .kh-hint,
.kitchen .km-hit:focus-visible .kh-hint {
    opacity: 1;
}
.kitchen .ks-hob:focus-visible,
.kitchen .ks-oven:focus-visible,
.kitchen .km-hit:focus-visible {
    outline: none;
}
.kitchen .kitchen-stove:has(.ks-hob:hover) .ks-body,
.kitchen .kitchen-stove:has(.ks-oven:hover) .ks-door,
.kitchen .kitchen-microwave:has(.km-hit:hover) .km-body {
    filter: drop-shadow(0 0 6px rgba(255, 220, 150, .6));
}
/* the kettle, on the back of the hob */
.kitchen .kitchen-kettle {
    position: absolute;
    left: 58%;
    bottom: 86%;
    width: 30%;
    aspect-ratio: 60 / 50;
    z-index: 2;
    pointer-events: none;
}

/* ---------------- the microwave, on the worktop ---------------- */
.kitchen .kitchen-microwave {
    left: 24.5%;
    bottom: calc(var(--floor-h) - 1vh + 24vh * .93);
    width: 9.5vw;
    min-width: 96px;
    aspect-ratio: 160 / 96;
    z-index: 3;
    container-type: inline-size;
}
.kitchen .kitchen-microwave>.km-body,
.kitchen .kitchen-microwave>.km-on {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.kitchen .km-body>svg,
.kitchen .km-body>.art,
.kitchen .km-on>svg,
.kitchen .km-on>.art {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
}
.kitchen .km-on {
    opacity: 0;
    transition: opacity .3s;
}
.kitchen .kitchen-microwave.running .km-on {
    opacity: 1;
}
.kitchen .kitchen-microwave.running {
    filter: drop-shadow(0 0 12px rgba(255, 210, 120, .45));
    animation: km-hum .09s linear infinite alternate;
}
@keyframes km-hum {
    from { translate: 0 0; }
    to { translate: .4px 0; }
}
/* the turning plate (the stand-in's: a dot going round, seen from the front) */
.kitchen .kitchen-microwave.running .km-plate {
    animation: km-turn 3s linear infinite;
}
@keyframes km-turn {
    0% { transform: translateX(0); }
    25% { transform: translateX(9px); }
    50% { transform: translateX(14px) scaleX(.9); }
    75% { transform: translateX(5px); }
    100% { transform: translateX(0); }
}
/* its clock, in the display (120-148 across, 16-30 down of 160 x 96) */
.kitchen .km-clock {
    position: absolute;
    left: 75%;
    top: 16.7%;
    width: 17.5%;
    height: 14.6%;
    display: grid;
    place-items: center;
    font: 700 5.2cqw/1 ui-monospace, Menlo, Consolas, monospace;
    color: #8adf8a;
    text-shadow: 0 0 4px rgba(120, 255, 120, .7);
    letter-spacing: .04em;
    pointer-events: none;
}
.kitchen .kitchen-microwave.blink .km-clock {
    animation: km-blink 1s steps(1) infinite;
}
@keyframes km-blink {
    50% { opacity: 0; }
}
.kitchen .km-hit {
    position: absolute;
    inset: 0;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}
/* salt and pepper, dancing on the worktop */
.kitchen .kitchen-shakers {
    left: 36.5%;
    bottom: calc(var(--floor-h) - 1vh + 24vh * .93);
    width: 3.2vw;
    min-width: 34px;
    aspect-ratio: 40 / 40;
    z-index: 3;
    pointer-events: none;
}

@media (max-width: 620px) {
    /* (5 Oct) a narrow kitchen: the fridge, the counter and the stove side by side, none over another (the fridge hid the
       first drawer). the traveller waits by the fridge (sky/kitchen.js, rest()): anywhere else they hid the counter or the oven */
    .kitchen .kitchen-stove {
        left: 74%;
        height: 14vh;
    }
    .kitchen .kitchen-microwave {
        left: 33.5%;
        bottom: calc(var(--floor-h) - 1vh + 18vh * .93);
        width: 13vw;
        min-width: 0;
    }
    .kitchen .kitchen-shakers {
        display: none;
    }
    .kitchen .kitchen-counter {
        left: 33%;
        right: 28%;
        height: 18vh;
    }
    .kitchen .kitchen-bowl {
        bottom: calc(var(--floor-h) - 1vh + 18vh * .93);
    }
    .kitchen .kitchen-serpent,
    .kitchen .kitchen-sausages {
        bottom: calc(var(--floor-h) - 1vh + 18vh * .93 - 1vh);
    }
    .kitchen .kitchen-bowl {
        left: 47%;
        width: 15vw;
        min-width: 0;
    }
    .kitchen .kitchen-serpent,
    .kitchen .kitchen-sausages {
        left: calc(47% - 4vw);
        width: 23vw;
        min-width: 0;
    }
    .kitchen .kitchen-fridge {
        left: 2%;
        height: 34vh;
    }
}
@media (prefers-reduced-motion: reduce) {
    .kitchen .kitchen-stove.lit .ks-flames .ks-flame,
    .kitchen .kitchen-microwave.running,
    .kitchen .kitchen-microwave.running .km-plate {
        animation: none;
    }
    .kitchen.bowl-turning.turn .kitchen-sausages,
    .kitchen.bowl-turning.turn .kitchen-serpent {
        animation-duration: .01s;
    }
}
