@font-face {
  font-family: "kkiwisodafnt";
  src: url("kAssets/kyrn0vgraphics/kFonts/kiwisodafont/KiwiSoda2.woff2")
      format("woff2"),
    url("kAssets/kyrn0vgraphics/kFonts/kiwisodafont/KiwiSoda.woff")
      format("woff");
  unicode-range: U+0000-00FF, U+20A0-20CF, U+2000-206F, U+2200-22FF, U+0100-017F;
  font-display: swap;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: #ff91b4;
    background-attachment: fixed;
    background-image: 
        linear-gradient(to bottom, rgba(255, 145, 180, 0) 20%, #ff91b4 100%),
        linear-gradient(45deg, rgba(255, 255, 255, 0.25) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.25) 75%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.25) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.25) 75%);
    background-position: 0 0, 0 0, 0 0;
    background-size: 100% 100%, 60px 60px, 60px 60px;
    animation: ktbmbg 3s linear infinite;
}

@keyframes ktbmbg {
    from {
        background-position: 0 0, 0 0, 0 0;
    }
    to {
        background-position: 0 0, 60px 60px, 60px 60px;
    }
}

#ktbBodyGrid {
    display: grid;
    grid-template-columns: auto auto auto;
    justify-content: center;
    align-content: center;
    min-height: 100vh;
    width: 100%;
    gap: 50px;
}

.ktbGridCol {
    position: relative;
    width: auto;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

#ktbCol2 {
    flex-direction: column;
    gap: 15px;
}

#ktbClawMachine {
    position: relative;
    transform-origin: center;
    width: 300px;
    height: 517px;
    user-select: none;
    -webkit-user-select: none;
    z-index: 10;
    overflow: hidden;
}

#ktbcmLayer1,
#ktbcmLayer2,
#ktbcmLayer3 {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

#ktbcmLayer1 {
    z-index: 1;
}

#ktbcmLayer2 {
    z-index: 2;
}

#ktbcmLayer3 {
    z-index: 3;
    pointer-events: auto;
}

#ktbcmBaseImg,
#ktbcmCaseImg,
#ktbcmGripBase,
#ktbcmBtnDown,
#ktbcmBtnDrop,
#ktbcmBtnLeft,
#ktbcmBtnRight,
#ktbcmBtnStart,
#ktbcmBtnUp {
    image-rendering: pixelated;
    position: absolute;
    margin: 0;
    padding: 0;
}

#ktbcmBtnDown,
#ktbcmBtnDrop,
#ktbcmBtnLeft,
#ktbcmBtnRight,
#ktbcmBtnStart,
#ktbcmBtnUp {
    cursor: pointer;
    transition: filter 0.2s, transform 0.1s;
}

#ktbcmBtnDown:active,
#ktbcmBtnDrop:active,
#ktbcmBtnLeft:active,
#ktbcmBtnRight:active,
#ktbcmBtnStart:active,
#ktbcmBtnUp:active,
.ktbcmBtnActiveState {
    transform: translateY(5px);
}

.ktbcmControlDisabled {
    filter: grayscale(100%) opacity(0.5);
    pointer-events: none;
}

.ktbcmStartActive {
    filter: brightness(1.15);
}

#ktbcmBaseImg,
#ktbcmCaseImg {
    top: 0px;
    left: 0px;
}

#ktbcmChuteContainer {
    position: absolute;
    width: 78px;
    height: 217px;
    top: 243px;
    left: 26px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    pointer-events: auto;
}

#ktbcmToysContainer {
    position: absolute;
    width: 170px;
    height: 230px;
    top: 65px;
    left: 104px;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

#ktbcmGripper {
    position: absolute;
    top: 87px;
    left: 52px;
    width: 26px;
    height: 26px;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 2px;
    overflow: visible;
}

#ktbcmGripBase {
    width: 39px;
    height: 261px;
    top: -265px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

#ktbcmGripLeft,
#ktbcmGripRight {
    image-rendering: pixelated;
    position: relative;
    width: 22px;
    height: 37px;
    margin: 0;
    padding: 0;
    transform-origin: top;
    z-index: 5;
}

.ktbcmGripAnimLeft {
    animation: ktbcmGrabLeftAnim 1s ease-in-out forwards;
}

.ktbcmGripAnimRight {
    animation: ktbcmGrabRightAnim 1s ease-in-out forwards;
}

.ktbcmGripAnimLeftSlow {
    animation: ktbcmGrabLeftAnim 1.5s ease-in-out forwards;
}

.ktbcmGripAnimRightSlow {
    animation: ktbcmGrabRightAnim 1.5s ease-in-out forwards;
}

@keyframes ktbcmGrabLeftAnim {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(25deg); }
}

@keyframes ktbcmGrabRightAnim {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-25deg); }
}

#ktbcmBtnDown {
    top: 339.8px;
    left: 74.3px;
}

#ktbcmBtnDrop {
    top: 317.8px;
    left: 139.3px;
}

#ktbcmBtnLeft {
    top: 317.8px;
    left: 52.3px;
}

#ktbcmBtnRight {
    top: 317.8px;
    left: 104.3px;
}

#ktbcmBtnStart {
    top: 317.8px;
    left: 196.3px;
}

#ktbcmBtnUp {
    top: 304.8px;
    left: 74.3px;
}

.ktbcmToyItem {
    position: absolute;
    max-width: 60px;
    max-height: 60px;
    box-sizing: border-box;
    z-index: 8;
    bottom: 0;
    pointer-events: none;
    display: block;
    image-rendering: pixelated;
}

.ktbcmToyInChute {
    pointer-events: auto;
    cursor: pointer;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

#ktbInventory {
    position: relative;
    width: 300px;
    height: 444px;
    background-image: url("kAssets/kyrn0vgraphics/kIllustrations/kiUI/kToyBox/ktbVintagepShelf.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    transform-origin: center;
    box-sizing: border-box;
    padding: 120px 25px 70px 25px; 
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 55px);
    row-gap: 40px;
    column-gap: 0;
    align-items: end;
    justify-items: center;
    z-index: 5;
    image-rendering: pixelated;
}

.ktbInvItem {
    min-width: 20px;
    min-height: 20px;
    max-width: 55px;
    max-height: 55px;
    object-fit: contain;
    image-rendering: pixelated;
    transition: transform 0.2s ease;
    transform-origin: bottom center;
}

.ktbInvLink {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    width: 100%;
    height: 100%;
    text-decoration: none;
    cursor: pointer;
}

.ktbInvLink:hover .ktbInvItem {
    transform: scale(1.2);
    z-index: 10;
    position: relative;
}

.ktbcmNavBtn {
    position: absolute;
    bottom: 170px;
    width: 25px;
    height: 41.67px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    user-select: none;
    z-index: 100;
    image-rendering: pixelated;
}

#ktbNavLeft {
    right: 300px;
    background-image: url("kAssets/kyrn0vgraphics/kIllustrations/kiUI/kToyBox/ktbvpsLeftArrownav.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    display: none;
}

#ktbNavRight {
    left: 300px;
    background-image: url("kAssets/kyrn0vgraphics/kIllustrations/kiUI/kToyBox/ktbvpsRightArrownav.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    display: none;
}

.ktbcmNavBtn:active {
    transform: scale(0.9);
}

#ktbFocusOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9000;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    backdrop-filter: blur(5px);
    background-color: rgba(0,0,0,0.2);
}

#ktbSunRays {
    position: absolute;
    width: 800px;
    height: 800px;
    background: repeating-conic-gradient(rgba(255, 255, 255, 0.4) 0deg 15deg, transparent 15deg 30deg);
    animation: ktbcmSpin 8s linear infinite;
    mask-image: radial-gradient(circle, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(circle, black 0%, transparent 70%);
    pointer-events: none;
}

@keyframes ktbcmSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ktbcmToyFocus {
    position: fixed;
    z-index: 9999;
    transition: all 1s ease-in-out;
    image-rendering: pixelated;
    object-fit: contain;
}

#ktbpsSigns {
    position: relative;
    transform-origin: center;
    width: 250px;
    height: 509px;
    user-select: none;
    -webkit-user-select: none;
    z-index: 15;
    overflow: hidden;
    image-rendering: pixelated;
    background-image: url("kAssets/kyrn0vgraphics/kIllustrations/kiUI/kToyBox/ktbpSigns.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    display: grid;
    grid-template-rows: 1fr 1fr;
    grid-template-columns: 100%;
    gap: 20px;
}

.ktbpsGridCell {
    width: 163px;
    height: 137px;
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: normal;
    word-break: normal;
}

.ktbpsHeading {
    text-align: center;
    margin: 0;
    padding: 0;
    width: 100%;
    font-size: 2rem;
    font-family: "kkiwisodafnt", sans-serif;
    font-weight: normal;
    color: white;
    cursor: text;
    user-select: text;
    -webkit-user-select: text;
}

.ktbpsText {
    text-align: left;
    margin: 0;
    padding: 0;
    width: 100%;
    font-size: 1.2rem;
    font-family: "kkiwisodafnt", sans-serif;
    font-weight: normal;
    color: white;
    cursor: text;
    user-select: text;
    -webkit-user-select: text;
}

#ktbpsHowTos {
    margin: 103px 0 0 37px;
    padding: 0;
}

#ktbpsCredits {
    margin: 79px 0 0 37px;
    padding: 0;
}

.ktbpsToggle {
    width: 100%;
    margin-bottom: 5px;
}

.ktbpsToggleTrigger {
    cursor: pointer;
    user-select: none;
    margin: 5px 0;
    padding: 0;
    font-family: "kkiwisodafnt", sans-serif;
    color: white;
    font-size: 1.2rem;
    list-style: none;
}

.ktbpsToggleTrigger::-webkit-details-marker {
    display: none;
}

.ktbpsToggleTrigger::before {
    content: "> ";
    display: inline-block;
}

.ktbpsToggle[open] > .ktbpsToggleTrigger::before {
    content: "- ";
}

.ktbpsToggleContent {
    padding-left: 10px;
    margin: 0;
}

.ktbpsGridCell::-webkit-scrollbar {
  width: 6px;
}

.ktbpsGridCell::-webkit-scrollbar-track {
  background: transparent;
}

.ktbpsGridCell::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
}

.ktbpsToggleTrigger:hover {
    text-decoration: underline;
}

#ktbcmResetToys {
    width: 150px;
    height: 36.25px;
    background-image: url("kAssets/kyrn0vgraphics/kIllustrations/kiUI/kbdgsAchievementsIcons/kbdgsBackGroundTB.png");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "kkiwisodafnt", sans-serif;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    user-select: none;
    image-rendering: pixelated;
    transition: transform 0.1s;
}

#ktbcmResetToys:active {
    transform: scale(0.95);
}