/* ---------------- MY KITCHEN (js/scenes/kitchen.js, page kit) ---------------- */
body.scene-kitchen { background: #ffeef5; }
body.scene-kitchen #topbar { position: absolute; left: 0; right: 0; top: 0; z-index: 50; background: none; border-bottom: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; pointer-events: none; }
body.scene-kitchen #topbar > * { pointer-events: auto; }
.kt-wrap { position: relative; width: 100%; height: 100%; color: #5a2d4c; }
.kt-tools, .kt-pantryview { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; height: 100%; }
.kt-left { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.kt button { font-family: inherit; color: #5a2d4c; -webkit-tap-highlight-color: transparent; cursor: pointer; }

/* the two tabs */
.kt-tabs { display: flex; gap: 10px; }
.kt-tab { flex: 1 1 0; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 6px; padding: 8px 10px; border-radius: 22px; border: 4px solid #5a2d4c; background: #fff; box-shadow: 0 5px 0 rgba(90,45,76,.2); text-align: left; }
.kt-tab.on { background: #ff8fb8; box-shadow: 0 5px 0 #5a2d4c; }
.kt-tab.on b, .kt-tab.on small { color: #fff; text-shadow: 0 2px 0 rgba(90,45,76,.45); }
.kt-tab:active { transform: translateY(3px); }
.kt-tab-ico { grid-row: 1 / span 2; display: flex; align-items: center; justify-content: center; width: 40px; height: 48px; }
.kt-tab-ico svg { display: block; overflow: visible; }
.kt-tab b { font-size: 22px; font-weight: 900; line-height: 1; }
.kt-tab small { font-size: 14px; font-weight: 800; opacity: .8; }

/* the cutting board, on a tiled backsplash */
.kt-board { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-radius: 26px; background-color: #fff; background-image: linear-gradient(#e3f2ff 2px, transparent 2px), linear-gradient(90deg, #e3f2ff 2px, transparent 2px); background-size: 40px 40px; border: 4px solid #5a2d4c; box-shadow: inset 0 0 0 6px #fff, 0 5px 0 rgba(90,45,76,.18); padding: 10px; cursor: pointer; }
.kt-board-svg { display: block; width: 100%; flex: 1 1 auto; min-height: 0; overflow: visible; }
.kt-board.pop .kt-board-tool { animation: ktLand .5s cubic-bezier(.3,1.7,.5,1); transform-box: fill-box; transform-origin: 50% 50%; }
.kt-name { flex: 0 0 auto; max-width: 100%; padding: 4px 16px; border-radius: 18px; background: #fff; border: 3px solid #5a2d4c; font-size: 20px; font-weight: 900; text-align: center; line-height: 1.15; }

/* the rail of tool kinds */
.kt-wall { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.kt-rail { flex: 0 0 auto; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 7px; padding: 8px; border-radius: 22px; background: #c9875a; border: 4px solid #5a2d4c; box-shadow: inset 0 4px 0 rgba(255,255,255,.25), 0 5px 0 rgba(90,45,76,.2); }
.kt-slot { position: relative; height: 74px; display: flex; align-items: center; justify-content: center; border-radius: 16px; border: 3px solid #5a2d4c; background: #fff7ee; padding: 0; }
.kt-slot.on { background: #ffd23f; transform: translateY(-3px); box-shadow: 0 4px 0 #5a2d4c; }
.kt-slot svg { display: block; height: 66px; width: auto; overflow: visible; }
.kt-slot i { position: absolute; right: -5px; bottom: -6px; min-width: 22px; height: 22px; border-radius: 11px; background: #fff; border: 2.5px solid #5a2d4c; font-size: 13px; font-weight: 900; font-style: normal; line-height: 17px; text-align: center; }

/* the pegboard */
.kt-peg { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; padding: 14px 14px 12px; border-radius: 26px; border: 5px solid #5a2d4c; background-color: #f6dcb6; background-image: radial-gradient(circle, #cfa274 0 2.6px, transparent 3.2px); background-size: 24px 24px; box-shadow: inset 0 0 0 8px #e9b97c, inset 0 0 0 11px rgba(90,45,76,.25), 0 6px 0 rgba(90,45,76,.2); }
.kt-tile { position: relative; min-height: 0; display: flex; align-items: flex-start; justify-content: center; padding: 18px 0 0; border: 0; background: none; }
.kt-tile .kt-pin { position: absolute; left: 50%; top: 6px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; border: 3px solid #5a2d4c; box-sizing: border-box; z-index: 2; }
.kt-tile .kt-art { position: absolute; left: 0; right: 0; top: 20px; bottom: 4px; display: flex; justify-content: center; align-items: center; }
.kt-tile .kt-art svg { display: block; height: 100%; max-height: 440px; width: auto; overflow: visible; filter: drop-shadow(0 5px 0 rgba(90,45,76,.18)); }
.kt-tile.locked .kt-art svg, .kt-item.locked .kt-art svg { filter: brightness(0); opacity: .2; }
.kt-tile.inuse .kt-art svg { filter: grayscale(1); opacity: .22; }
.kt-tile .kt-use { position: absolute; left: 50%; top: 46%; transform: translateX(-50%) rotate(-8deg); padding: 3px 10px; border-radius: 14px; background: #3fbf8a; color: #fff; border: 3px solid #5a2d4c; font-size: 16px; font-weight: 900; font-style: normal; white-space: nowrap; }
.kt-tile:not(.locked):not(.inuse):active .kt-art { transform: translateY(-6px) rotate(-6deg); }
.kt-lock { position: absolute; left: 50%; top: 52%; transform: translateX(-50%); line-height: 0; font-style: normal; z-index: 3; }
.kt-lock.box svg { display: block; filter: drop-shadow(0 3px 0 rgba(90,45,76,.25)); }
.kt-tile.wig .kt-art, .kt-item.wig .kt-art { animation: ktWig .45s ease-in-out; }
.kt-fly { position: fixed; z-index: 9400; pointer-events: none; display: flex; justify-content: center; }
.kt-fly svg { height: 100%; width: auto; overflow: visible; }

/* the pantry */
.kt-pantry { min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 16px 18px; border-radius: 26px; border: 5px solid #5a2d4c; background: #fff7ee; box-shadow: inset 0 0 0 8px #e9b97c, 0 6px 0 rgba(90,45,76,.2); }
.kt-shelf-title { margin: 6px 6px 8px; font-size: 22px; font-weight: 900; }
.kt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kt-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 8px; border-radius: 20px; border: 3px solid #5a2d4c; background: #fff; box-shadow: 0 4px 0 rgba(90,45,76,.18); }
.kt-item .kt-art { display: block; height: 84px; }
.kt-item .kt-art svg { display: block; height: 84px; width: 84px; overflow: visible; }
.kt-item b { font-size: 15px; font-weight: 900; line-height: 1.1; text-align: center; min-height: 2.2em; display: flex; align-items: center; }
.kt-item.locked { background: #f6ecf1; }
.kt-item .kt-lock { top: 34%; }
.kt-pantryview .kt-left .kt-tabs { flex-direction: column; }
.kt-pantryview .kt-tab { flex: 0 0 auto; padding: 14px 12px; }

@keyframes ktLand { 0% { transform: scale(.6); } 60% { transform: scale(1.12); } 100% { transform: none; } }
@keyframes ktWig { 25% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } 75% { transform: rotate(-4deg); } }

/* phone on its side: a little tighter */
.pk-stage.phone.wide .kt-tools, .pk-stage.phone.wide .kt-pantryview { grid-template-columns: 290px minmax(0, 1fr); gap: 16px; }
.pk-stage.phone.wide .kt-slot { height: 60px; }
.pk-stage.phone.wide .kt-slot svg { height: 54px; }
.pk-stage.phone.wide .kt-rail { padding: 6px; }

/* portrait: tabs, then the board, the rail (two rows) and the pegboard (three across) */
.pk-stage.tall .kt-tools { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); gap: 16px; }
.pk-stage.tall .kt-tools .kt-left { display: grid; grid-template-columns: 1fr; gap: 12px; }
.pk-stage.tall .kt-board { height: 210px; flex: none; flex-direction: row; gap: 12px; }
.pk-stage.tall .kt-board-svg { height: 100%; width: auto; flex: 0 1 auto; }
.pk-stage.tall .kt-rail { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pk-stage.tall .kt-peg { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.pk-stage.tall .kt-pantryview { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); gap: 16px; }
.pk-stage.tall .kt-pantryview .kt-left .kt-tabs { flex-direction: row; }
.pk-stage.tall .kt-pantryview .kt-tab { flex: 1 1 0; padding: 8px 10px; }
